From c62c15d6974cc94f1ef842371f7125c6225b0324 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 30 Nov 2024 16:36:08 -0600 Subject: [PATCH] Update run.sh --- run.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/run.sh b/run.sh index f1ce1363..7d4a1b2e 100755 --- a/run.sh +++ b/run.sh @@ -42,21 +42,23 @@ if [ "${1}" == "update" ]; then git prune >/dev/null 2>&1 git pull >/dev/null 2>&1 git submodule update --remote >/dev/null 2>&1 - /bin/chmod +x /opt/idssys/powerwall/powerwall.sh 2>&1 + /bin/chmod +x ${PW_FOLDER}/powerwall.sh 2>&1 source ${PW_FOLDER}/defaults.inc if [ "${2}" != "q" ]; then echo -en "\e[1A"; echo -e "\e[0K\r ${idsCL[Green]}Update to v${VERS} complete${idsCL[Default]}" fi - echo -en "${idsCL[LightCyan]}Do you want to restart PowerWall Services as well? (y/N): " - read -n 1 choice - case "$choice" in - [Yy]) - echo -e "\n\n${idsCL[Yellow]}Restarting Powerwall services to apply update ..." - ${PW_SCRIPT} service all restart - ;; - *) echo;; - esac + if [ ! -f ${PW_TMPFOLDER}/.singleserver.PW.secondary ]; then + echo -en "${idsCL[LightCyan]}Do you want to restart PowerWall Services as well? (y/N): " + read -n 1 choice + case "$choice" in + [Yy]) + echo -e "\n\n${idsCL[Yellow]}Restarting Powerwall services to apply update ..." + ${PW_SCRIPT} service all restart + ;; + *) echo;; + esac + fi elif [ "${2}" != "q" ]; then echo -en "\e[1A";