Update run.sh
This commit is contained in:
28
run.sh
28
run.sh
@@ -44,26 +44,32 @@ if [ "${1}" == "update" ]; then
|
||||
git submodule update --remote >/dev/null 2>&1
|
||||
/bin/chmod +x /opt/idssys/powerwall/powerwall.sh 2>&1
|
||||
source /opt/idssys/powerwall/defaults.inc
|
||||
|
||||
if [ "${2}" != "q" ]; then
|
||||
echo -en "\e[1A";
|
||||
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
|
||||
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 ${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): "
|
||||
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
|
||||
|
||||
else
|
||||
${PW_SCRIPT} service all restart
|
||||
fi
|
||||
|
||||
elif [ "${2}" != "q" ]; then
|
||||
echo -en "\e[1A";
|
||||
echo -e "\e[0K\r ${idsCL[LightCyan]}No Updates Available${idsCL[Default]}\n"
|
||||
fi
|
||||
|
||||
fi
|
||||
if [ "${2}" == "-a" ] || [ "${2}" == "all" ]; then
|
||||
echo -e "${idsCL[White]}Updating the Offsite Monitor...${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user