Update offsite-power-check.sh

This commit is contained in:
2024-01-01 23:22:50 -06:00
parent 8de869e8a2
commit 737b8fac76

View File

@@ -183,7 +183,6 @@ case $1 in
restart) PWO_RESTART;;
logrotate) LOGROTATE;;
update)
cd ${PW_FOLDER}
if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
# cd /opt/idssys/defaults
# if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
@@ -195,6 +194,7 @@ case $1 in
# git pull >/dev/null 2>&1
# git submodule update --remote >/dev/null 2>&1
# fi
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
git fetch origin master >/dev/null 2>&1
git reset --hard origin/master >/dev/null 2>&1