mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-11 07:39:48 +01:00
Restart if different than active
This commit is contained in:
@@ -51,7 +51,7 @@ while true; do
|
||||
if (( wavs > 100 )) && [[ "$state" == "active" ]]; then
|
||||
sudo systemctl stop "$srv"
|
||||
bashio::log.red "$(date) WARNING stopped $srv service"
|
||||
elif (( wavs <= 100 )) && [[ "$state" == "inactive" ]]; then
|
||||
elif (( wavs <= 100 )) && [[ "$state" != "active" ]]; then
|
||||
sudo systemctl start $srv
|
||||
bashio::log.yellow "$(date) INFO started $srv service"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user