bug dans ntfy
This commit is contained in:
@@ -245,6 +245,7 @@ if [ "$ALERT" = true ]; then
|
||||
SUBJECT="🔴 ALERTE SERVEUR [$HOST] - $(date +'%H:%M')"
|
||||
|
||||
if [ -z "$NTFY_TOPIC" ]; then
|
||||
echo "Envoi d'un mail"
|
||||
# Construction du corps du mail avec un header propre
|
||||
MAIL_BODY="Bonjour,\n\nUne ou plusieurs anomalies ont été détectées sur le serveur : $HOST\n"
|
||||
MAIL_BODY="$MAIL_BODY\n------------------------------------------------\n"
|
||||
@@ -254,7 +255,7 @@ if [ "$ALERT" = true ]; then
|
||||
|
||||
echo -e "$MAIL_BODY" | mail -s "$SUBJECT" "$DEST"
|
||||
else
|
||||
# Mode NTFY
|
||||
echo "# Mode NTFY"
|
||||
AUTH_OPT=()
|
||||
[ -n "$NTFY_TOKEN" ] && AUTH_OPT=(-H "Authorization: Bearer $NTFY_TOKEN")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user