Update run.sh

This commit is contained in:
2025-06-13 20:37:37 -05:00
parent ea53f21247
commit d43d6a090f

8
run.sh
View File

@@ -44,10 +44,11 @@ if [ "${1}" == "update" ]; then
git submodule update --remote >/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 /opt/idssys/powerwall/powerwall.sh 2>&1
source /opt/idssys/powerwall/defaults.inc source /opt/idssys/powerwall/defaults.inc
if [ "${2}" != "q" ]; then if [ "${2}" != "q" ]; then
echo -en "\e[1A"; echo -en "\e[1A";
echo -e "\e[0K\r ${idsCL[Green]}Update to v${PW_VERS} complete${idsCL[Default]}" echo -e "\e[0K\r ${idsCL[Green]}Update to v${PW_VERS} complete${idsCL[Default]}"
fi
if [ -f ${NM_TMPFOLDER}/.singleserver.PW.primary ] || [ -f ${NM_TMPFOLDER}/.singleserver.PWO.primary ]; then if [ -f ${NM_TMPFOLDER}/.singleserver.PW.primary ] || [ -f ${NM_TMPFOLDER}/.singleserver.PWO.primary ]; then
echo -en "${idsCL[LightCyan]}Do you want to restart PowerWall Services as well? (y/N): " echo -en "${idsCL[LightCyan]}Do you want to restart PowerWall Services as well? (y/N): "
read -n 1 choice read -n 1 choice
@@ -60,10 +61,15 @@ if [ "${1}" == "update" ]; then
esac esac
fi fi
else
${PW_SCRIPT} service all restart
fi
elif [ "${2}" != "q" ]; then elif [ "${2}" != "q" ]; then
echo -en "\e[1A"; echo -en "\e[1A";
echo -e "\e[0K\r ${idsCL[LightCyan]}No Updates Available${idsCL[Default]}\n" echo -e "\e[0K\r ${idsCL[LightCyan]}No Updates Available${idsCL[Default]}\n"
fi fi
fi fi
if [ "${2}" == "-a" ] || [ "${2}" == "all" ]; then if [ "${2}" == "-a" ] || [ "${2}" == "all" ]; then
echo -e "${idsCL[White]}Updating the Offsite Monitor...${idsCL[Default]}" echo -e "${idsCL[White]}Updating the Offsite Monitor...${idsCL[Default]}"