bundles/apt: check for "reboot required" in icinga check only
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit

This avoids the need to manually adjust the status file after a reboot of
the server.
This commit is contained in:
Franzi 2022-01-30 11:43:14 +01:00
parent 11969b6064
commit 4cfbdb32d6
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 12 additions and 13 deletions

View file

@ -22,12 +22,16 @@ case "$exitcode" in
exit 1
;;
reboot)
echo "Upgrades require a reboot, but automatic rebooting is disabled"
exit 1
;;
0)
echo "OK"
exit 0
if [[ -f /var/run/reboot-required ]]
then
echo "OK, but updates require a reboot"
exit 1
else
echo "OK"
exit 0
fi
;;
*)
echo "Last exitcode was $exitcode"