mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-04-12 18:39:55 +02:00
Update 30-monitoring.sh
This commit is contained in:
@@ -113,11 +113,11 @@ check_and_restart_service() {
|
|||||||
if [[ "$state" != "active" ]]; then
|
if [[ "$state" != "active" ]]; then
|
||||||
log_yellow "$(date) INFO: Restarting $service_name"
|
log_yellow "$(date) INFO: Restarting $service_name"
|
||||||
sudo systemctl restart "$service_name"
|
sudo systemctl restart "$service_name"
|
||||||
sleep 5
|
sleep 61
|
||||||
state=$(systemctl is-active "$service_name")
|
state=$(systemctl is-active "$service_name")
|
||||||
if [[ "$state" != "active" ]]; then
|
if [[ "$state" != "active" ]]; then
|
||||||
log_red "$(date) WARNING: $service_name could not restart"
|
log_red "$(date) WARNING: $service_name could not restart"
|
||||||
apprisealert "$service_name cannot restart"
|
apprisealert "$service_name cannot restart ! Your system seems stuck."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user