]> code.delx.au - monosys/blob - healthcheck/systemd-user-timers
healthcheck: systemd-user-timers
[monosys] / healthcheck / systemd-user-timers
1 #!/bin/bash
2
3 cd ~/.config/systemd/user/ &> /dev/null || exit 0
4
5 error=0
6 for timer in *.timer; do
7 if ! systemctl --user is-enabled "$timer" > /dev/null; then
8 echo "disabled timer $timer"
9 error=1
10 fi
11 if ! systemctl --user is-active "$timer" > /dev/null; then
12 echo "inactive timer $timer"
13 error=1
14 fi
15 done
16
17 exit "$error"