This commit is contained in:
2022-09-11 16:05:14 -05:00
parent d2aa4838fe
commit a1ca3d8bc3
3 changed files with 3 additions and 37 deletions

View File

@@ -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'

View File

@@ -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

7
run.sh
View File

@@ -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]}"