update
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
VERS='1.090822'
|
VERS='1.090822'
|
||||||
|
|
||||||
|
noupdate=' stop '
|
||||||
|
|
||||||
mqtt_conn='/usr/bin/mosquitto_sub -h 127.0.0.1 -u mqtt -P 12mqtt34password56'
|
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'
|
mysql_conn='/usr/bin/mysql -h mysqldb.scity.us -P 6033 --user=sysmoninsert --password=sysmoninsert'
|
||||||
|
|
||||||
|
|||||||
31
powerwall.sh
31
powerwall.sh
@@ -143,36 +143,6 @@ CHECKACV_SERVICE(){
|
|||||||
done # &
|
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(){
|
SHUTDOWN_SERVERS(){
|
||||||
touch $FOLDER/shutdown
|
touch $FOLDER/shutdown
|
||||||
|
|
||||||
@@ -208,7 +178,6 @@ SHUTDOWN_SERVERS(){
|
|||||||
|
|
||||||
if [ ${action-x} ]; then
|
if [ ${action-x} ]; then
|
||||||
case $action in
|
case $action in
|
||||||
update) UPDATE;;
|
|
||||||
checktemp) CHECKTEMP ${2};;
|
checktemp) CHECKTEMP ${2};;
|
||||||
checktemp_service)
|
checktemp_service)
|
||||||
if [ "${2}" = "stop" ]; then
|
if [ "${2}" = "stop" ]; then
|
||||||
|
|||||||
7
run.sh
7
run.sh
@@ -5,12 +5,7 @@ source /opt/idssys/defaults/colors.inc
|
|||||||
source /opt/idssys/defaults/default.inc
|
source /opt/idssys/defaults/default.inc
|
||||||
source /opt/idssys/powerwall/powerwall.conf
|
source /opt/idssys/powerwall/powerwall.conf
|
||||||
|
|
||||||
if [[ "${noheader}" != *" ${1} "* ]] && [[ "${noheader}" != *" ${2} "* ]]; then
|
if [[ "${noupdate}" != *" ${1} "* ]] && [[ "${noupdate}" != *" ${2} "* ]]; then
|
||||||
# if [ "${1}" = "gui" ]; then
|
|
||||||
# DISP_HEADER
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# if [ "${1}" != "guiX" ]; then
|
|
||||||
if curl -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
|
if curl -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then
|
||||||
if [ "${2}" != "q" ]; then
|
if [ "${2}" != "q" ]; then
|
||||||
echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user