2022-02-06 13:39:52 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
timer="$1"
|
|
|
|
shift
|
|
|
|
|
|
|
|
"$@"
|
|
|
|
exitcode=$?
|
|
|
|
|
2022-09-11 11:26:57 +02:00
|
|
|
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
|