bundlewrap/bundles/systemd-timers/files/systemd-timer-monitored

16 lines
211 B
Text
Raw Normal View History

#!/bin/bash
2022-02-06 12:39:52 +00:00
timer="$1"
shift
"$@"
exitcode=$?
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