From a1ca3d8bc394408dd9ce4a1a8e6983f2bde657e2 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 11 Sep 2022 16:05:14 -0500 Subject: [PATCH] update --- defaults.inc | 2 ++ powerwall.sh | 31 ------------------------------- run.sh | 7 +------ 3 files changed, 3 insertions(+), 37 deletions(-) diff --git a/defaults.inc b/defaults.inc index f14c66fb..234c9d37 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,8 @@ VERS='1.090822' +noupdate=' stop ' + mqtt_conn='/usr/bin/mosquitto_sub -h 127.0.0.1 -u mqtt -P 12mqtt34password56' mysql_conn='/usr/bin/mysql -h mysqldb.scity.us -P 6033 --user=sysmoninsert --password=sysmoninsert' diff --git a/powerwall.sh b/powerwall.sh index b63fff7b..ca7d9562 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -143,36 +143,6 @@ CHECKACV_SERVICE(){ done # & } -UPDATE(){ - echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}" - echo "" - - if curl -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 - 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 - fi - - cd /opt/idssys/powerwall - 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 - fi - - echo -en "\e[1A"; - echo -e "\e[0K\r ${idsCL[Green]}Updates Completed${idsCL[Default]}" - fi -} - SHUTDOWN_SERVERS(){ touch $FOLDER/shutdown @@ -208,7 +178,6 @@ SHUTDOWN_SERVERS(){ if [ ${action-x} ]; then case $action in - update) UPDATE;; checktemp) CHECKTEMP ${2};; checktemp_service) if [ "${2}" = "stop" ]; then diff --git a/run.sh b/run.sh index 03025952..8fba279f 100755 --- a/run.sh +++ b/run.sh @@ -5,12 +5,7 @@ source /opt/idssys/defaults/colors.inc source /opt/idssys/defaults/default.inc source /opt/idssys/powerwall/powerwall.conf -if [[ "${noheader}" != *" ${1} "* ]] && [[ "${noheader}" != *" ${2} "* ]]; then - # if [ "${1}" = "gui" ]; then - # DISP_HEADER - # fi - - # if [ "${1}" != "guiX" ]; then +if [[ "${noupdate}" != *" ${1} "* ]] && [[ "${noupdate}" != *" ${2} "* ]]; then if curl -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then if [ "${2}" != "q" ]; then echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}"