add bundle:systemd-timers
This commit is contained in:
parent
2a3a26c333
commit
0599c4dae0
7 changed files with 145 additions and 0 deletions
24
bundles/systemd-timers/files/check_systemd_timer
Normal file
24
bundles/systemd-timers/files/check_systemd_timer
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [[ -z "$1" ]]
|
||||
then
|
||||
echo "Usage: $0 <timer>"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
if ! [[ -f "/var/lib/systemd-timer-monitored/$1" ]]
|
||||
then
|
||||
echo "No status file found"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
exitcode="$(cat "/var/lib/systemd-timer-monitored/$1")"
|
||||
|
||||
echo "Last timer run exited $exitcode"
|
||||
|
||||
if [[ $exitcode -ne 0 ]]
|
||||
then
|
||||
exit 2
|
||||
else
|
||||
exit 0
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue