Update offsite-power-check.sh

This commit is contained in:
2023-11-05 20:04:14 -06:00
parent b7744ce842
commit d2e25c44bf

View File

@@ -109,7 +109,15 @@ case $1 in
restart) PWO_RESTART;;
update)
cd ${PW_TMPFOLDER}
git pull
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 reset --hard origin/master >/dev/null 2>&1
git reflog expire --expire=now --all >/dev/null 2>&1
git repack -ad >/dev/null 2>&1
git prune >/dev/null 2>&1
git pull >/dev/null 2>&1
# /bin/chmod +x /opt/idssys/powerwall/offsite-power-check.sh 2>&1
fi
;;
esac