more checks
This commit is contained in:
@@ -48,7 +48,18 @@ fi
|
|||||||
if systemctl is-active "$TIMER_NAME" &> /dev/null; then
|
if systemctl is-active "$TIMER_NAME" &> /dev/null; then
|
||||||
print_status "Renewal Timer" 0
|
print_status "Renewal Timer" 0
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
exit $EXIT_CODE
|
exit $EXIT_CODE
|
||||||
|
|||||||
Reference in New Issue
Block a user