From cdae2502655ab07014a81f2f8597a980c970df6f Mon Sep 17 00:00:00 2001 From: James Bunton Date: Tue, 16 Jun 2020 15:00:13 +1000 Subject: [PATCH] healthcheck: systemd-user-timers --- healthcheck/systemd-user-timers | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 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" -- 2.39.2