bug dans ntfy

This commit is contained in:
2026-03-08 23:23:31 +01:00
parent 4aaed529ea
commit a999510c6c
2 changed files with 3 additions and 2 deletions

View File

@@ -245,6 +245,7 @@ if [ "$ALERT" = true ]; then
SUBJECT="🔴 ALERTE SERVEUR [$HOST] - $(date +'%H:%M')" SUBJECT="🔴 ALERTE SERVEUR [$HOST] - $(date +'%H:%M')"
if [ -z "$NTFY_TOPIC" ]; then if [ -z "$NTFY_TOPIC" ]; then
echo "Envoi d'un mail"
# Construction du corps du mail avec un header propre # 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="Bonjour,\n\nUne ou plusieurs anomalies ont été détectées sur le serveur : $HOST\n"
MAIL_BODY="$MAIL_BODY\n------------------------------------------------\n" MAIL_BODY="$MAIL_BODY\n------------------------------------------------\n"
@@ -254,7 +255,7 @@ if [ "$ALERT" = true ]; then
echo -e "$MAIL_BODY" | mail -s "$SUBJECT" "$DEST" echo -e "$MAIL_BODY" | mail -s "$SUBJECT" "$DEST"
else else
# Mode NTFY echo "# Mode NTFY"
AUTH_OPT=() AUTH_OPT=()
[ -n "$NTFY_TOKEN" ] && AUTH_OPT=(-H "Authorization: Bearer $NTFY_TOKEN") [ -n "$NTFY_TOKEN" ] && AUTH_OPT=(-H "Authorization: Bearer $NTFY_TOKEN")

View File

@@ -1 +1 @@
2e123bfc0e0fee37f1964b6bf037e0a179623b56b3c969a90e69410f346c2f93 sys_check.sh 67e1a9853c4ce2f53ad24149d0c3ca1652048b7e081d8bf329bf2abf0b388454 sys_check.sh