Update 30-monitoring.sh

This commit is contained in:
Alexandre
2025-02-04 12:03:24 +01:00
committed by GitHub
parent 75955d7a0e
commit cd0e5d059f

View File

@@ -115,7 +115,8 @@ while true; do
if [[ "$state" != "active" ]]; then
log_yellow "$(date) INFO: Restarting $service service"
sudo systemctl restart "$service"
wait 5
sleep 5
state="$(systemctl is-active "$service")"
if [[ "$state" != "active" ]]; then
log_red "$(date) WARNING: $service could not restart"
apprisealert "$service cannot restart"