From: James Bunton Date: Tue, 16 Jun 2020 05:00:13 +0000 (+1000) Subject: healthcheck: systemd-user-timers X-Git-Url: https://code.delx.au/monosys/commitdiff_plain/cdae2502655ab07014a81f2f8597a980c970df6f healthcheck: systemd-user-timers --- diff --git a/healthcheck/systemd-user-timers b/healthcheck/systemd-user-timers new file mode 100755 index 0000000..e4679e7 --- /dev/null +++ b/healthcheck/systemd-user-timers @@ -0,0 +1,17 @@ +#!/bin/bash + +cd ~/.config/systemd/user/ &> /dev/null || exit 0 + +error=0 +for timer in *.timer; do + if ! systemctl --user is-enabled "$timer" > /dev/null; then + echo "disabled timer $timer" + error=1 + fi + if ! systemctl --user is-active "$timer" > /dev/null; then + echo "inactive timer $timer" + error=1 + fi +done + +exit "$error"