Update run.sh

This commit is contained in:
2024-08-27 21:49:53 -05:00
parent 0c6dd2817e
commit 8a8edf50a6

7
run.sh
View File

@@ -43,9 +43,10 @@ if [ "${1}" == "update" ]; then
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]}\n"
echo -e "\e[0K\r ${idsCL[Green]}Update to v${VERS} complete${idsCL[Default]}"
fi
read -n 1 -p "Do you want to restart PowerWall Services? (y/N): " choice
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 ..."
@@ -60,7 +61,7 @@ if [ "${1}" == "update" ]; then
fi
fi
if [ "${2}" == "-a" ] || [ "${2}" == "all" ]; then
echo -e "${idsCL[LightCyan]}Updating the Offsite Monitor...${idsCL[Default]}"
echo -e "${idsCL[White]}Updating the Offsite Monitor...${idsCL[Default]}"
ssh root@${PW_OFFSITE_MONITOR} "pw update"
fi