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