From 2387bb1e6a77e756ae34ed051a3e09405d063fb6 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sun, 28 Dec 2025 18:18:59 -0600 Subject: [PATCH] more checks --- scripts/check_status.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/check_status.sh b/scripts/check_status.sh index c55c12d..4d264af 100755 --- a/scripts/check_status.sh +++ b/scripts/check_status.sh @@ -48,7 +48,18 @@ fi if systemctl is-active "$TIMER_NAME" &> /dev/null; then print_status "Renewal Timer" 0 else - print_status "Renewal Timer" 1 "Systemd timer '$TIMER_NAME' is not active" + # Check if unit exists + if systemctl list-unit-files "$TIMER_NAME" &> /dev/null; then + print_status "Renewal Timer" 1 "Systemd timer '$TIMER_NAME' is installed but not active" + else + # Check if source file exists + TIMER_FILE="/etc/systemd/system/$TIMER_NAME" + if [ -f "$TIMER_FILE" ]; then + print_status "Renewal Timer" 1 "Systemd timer '$TIMER_NAME' is not installed (found source at $TIMER_FILE)" + else + print_status "Renewal Timer" 1 "Systemd timer '$TIMER_NAME' is missing entirely (expected at $TIMER_FILE)" + fi + fi fi exit $EXIT_CODE