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