Update offsite-power-check.sh
This commit is contained in:
@@ -109,7 +109,7 @@ case $1 in
|
|||||||
stop) PWO_STOP;;
|
stop) PWO_STOP;;
|
||||||
restart) PWO_RESTART;;
|
restart) PWO_RESTART;;
|
||||||
update)
|
update)
|
||||||
cd ${PW_TMPFOLDER}
|
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
|
||||||
git fetch origin master >/dev/null 2>&1
|
git fetch origin master >/dev/null 2>&1
|
||||||
git reset --hard origin/master >/dev/null 2>&1
|
git reset --hard origin/master >/dev/null 2>&1
|
||||||
@@ -118,7 +118,7 @@ case $1 in
|
|||||||
git prune >/dev/null 2>&1
|
git prune >/dev/null 2>&1
|
||||||
git pull >/dev/null 2>&1
|
git pull >/dev/null 2>&1
|
||||||
# /bin/chmod +x /opt/idssys/powerwall/offsite-power-check.sh 2>&1
|
# /bin/chmod +x /opt/idssys/powerwall/offsite-power-check.sh 2>&1
|
||||||
${PW_TMPFOLDER}/offsite-power-check.sh restart &
|
PWO_RESTART
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -129,4 +129,3 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user