bundles/systemd-timers: don't auto-reset alerts

This commit is contained in:
Franzi 2022-09-11 11:26:57 +02:00
parent f004591e98
commit d9be69d3a9
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 15 additions and 14 deletions

View file

@ -3,8 +3,13 @@
timer="$1"
shift
# Simple wrapper script that stores the exit code of a command into a file
"$@"
exitcode=$?
echo "$exitcode" > "/var/lib/systemd-timer-monitored/$timer"
if [[ $exitcode -ne 0 ]]
then
echo "$(date -u +%s)" > "/var/lib/systemd-timer-monitored/$timer"
fi
# to make systemd aware of the error, too.
exit $exitcode