Update offsite-power-check.sh
This commit is contained in:
@@ -183,7 +183,6 @@ case $1 in
|
|||||||
restart) PWO_RESTART;;
|
restart) PWO_RESTART;;
|
||||||
logrotate) LOGROTATE;;
|
logrotate) LOGROTATE;;
|
||||||
update)
|
update)
|
||||||
cd ${PW_FOLDER}
|
|
||||||
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
|
||||||
# cd /opt/idssys/defaults
|
# 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
|
# 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 pull >/dev/null 2>&1
|
||||||
# git submodule update --remote >/dev/null 2>&1
|
# git submodule update --remote >/dev/null 2>&1
|
||||||
# fi
|
# 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
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user