Update run.sh
This commit is contained in:
7
run.sh
7
run.sh
@@ -4,7 +4,6 @@
|
|||||||
source /opt/idssys/defaults/colors.inc
|
source /opt/idssys/defaults/colors.inc
|
||||||
source /opt/idssys/defaults/default.inc
|
source /opt/idssys/defaults/default.inc
|
||||||
source /opt/idssys/powerwall/defaults.inc
|
source /opt/idssys/powerwall/defaults.inc
|
||||||
source /opt/idssys/powerwall/settings.conf
|
|
||||||
|
|
||||||
if [ "${1}" == "update" ]; then
|
if [ "${1}" == "update" ]; then
|
||||||
if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
|
if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
|
||||||
@@ -27,7 +26,7 @@ if [ "${1}" == "update" ]; then
|
|||||||
git submodule update --remote >/dev/null 2>&1
|
git submodule update --remote >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /opt/idssys/powerwall
|
cd ${PW_FOLDER}
|
||||||
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
|
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
|
||||||
if [ "${2}" != "q" ]; then
|
if [ "${2}" != "q" ]; then
|
||||||
echo -en "\e[1A";
|
echo -en "\e[1A";
|
||||||
@@ -50,7 +49,7 @@ if [ "${1}" == "update" ]; then
|
|||||||
case "$choice" in
|
case "$choice" in
|
||||||
[Yy])
|
[Yy])
|
||||||
echo -e "\n${idsCL[Yellow]}Restarting Powerwall services to apply update ${idsCL[White]} ... "
|
echo -e "\n${idsCL[Yellow]}Restarting Powerwall services to apply update ${idsCL[White]} ... "
|
||||||
/opt/idssys/powerwall/powerwall.sh service all restart
|
${PW_SCRIPT} service all restart
|
||||||
;;
|
;;
|
||||||
*) echo;;
|
*) echo;;
|
||||||
esac
|
esac
|
||||||
@@ -63,7 +62,7 @@ if [ "${1}" == "update" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/opt/idssys/powerwall/powerwall.sh ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10}
|
${PW_SCRIPT} ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user