extended update-notify.sh to send a notification if a reboot is needed
This commit is contained in:
parent
193cb7a2a7
commit
c395134a75
1 changed files with 9 additions and 0 deletions
|
@ -19,3 +19,12 @@ echo "$UPDATE"
|
||||||
if [[ $UPDATE == *$'\n'* ]]; then
|
if [[ $UPDATE == *$'\n'* ]]; then
|
||||||
curl -F "title=$TITLE" -F "message=$UPDATE" -F "priority=5" "https://push.sp-codes.de/message?token=$GOTIFY_TOKEN"
|
curl -F "title=$TITLE" -F "message=$UPDATE" -F "priority=5" "https://push.sp-codes.de/message?token=$GOTIFY_TOKEN"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /var/run/reboot-required ]; then
|
||||||
|
TITLE="Reboot required on $HOST"
|
||||||
|
MESSAGE="Reboot required\n"
|
||||||
|
if [ -f /var/run/reboot-required.pkgs ]; then
|
||||||
|
MESSAGE+=$(cat /var/run/reboot-required.pkgs)
|
||||||
|
fi
|
||||||
|
curl -F "title=$TITLE" -F "message=$MESSAGE" -F "priority=5" "https://push.sp-codes.de/message?token=$GOTIFY_TOKEN"
|
||||||
|
fi
|
||||||
|
|
Reference in a new issue