mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-06 07:35:56 +02:00
Update 30-monitoring.sh
This commit is contained in:
@@ -87,8 +87,8 @@ while true; do
|
|||||||
|
|
||||||
# Check service states
|
# Check service states
|
||||||
for service in "$srv" "$srv2"; do
|
for service in "$srv" "$srv2"; do
|
||||||
local state_var="${service}_state"
|
state_var="${service}_state"
|
||||||
if [[ "${!state_var}" != "active" ]]; then
|
if [[ "${state_var:-}" != "active" ]]; then
|
||||||
log_yellow "$(date) INFO: Restarting $service service"
|
log_yellow "$(date) INFO: Restarting $service service"
|
||||||
sudo systemctl restart "$service"
|
sudo systemctl restart "$service"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user