diff --git a/run.sh b/run.sh index ec3f8a70..898e0027 100755 --- a/run.sh +++ b/run.sh @@ -46,9 +46,13 @@ if [ "${1}" == "update" ]; then echo -en "\e[1A"; echo -e "\e[0K\r ${idsCL[Green]}Update to v${VERS} complete${idsCL[Default]}\n" fi - # echo -en "${idsCL[Yellow]}Restarting Powerwall services to apply update ${idsCL[White]} ... " - # /opt/idssys/powerwall/powerwall.sh service all restart >/dev/null 2>&1 - # echo -e "${idsCL[Green]}Done${idsCL[Default]}\n" + read -n 1 -p "Do you want to restart PowerWall Services? (y/N): " choice + case "$choice" in + [Yy]) + echo -en "${idsCL[Yellow]}Restarting Powerwall services to apply update ${idsCL[White]} ... " + /opt/idssys/powerwall/powerwall.sh service all restart >/dev/null 2>&1 + echo -e "${idsCL[Green]}Done${idsCL[Default]}\n" ;; + esac elif [ "${2}" != "q" ]; then echo -en "\e[1A";