Restart if different than active

This commit is contained in:
Alexandre
2024-06-03 07:22:55 +02:00
committed by GitHub
parent 1fd28446f7
commit b786c01601

View File

@@ -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