Update update.sh

merge-requests/1/head
Esteban Mackay Q 2 years ago
parent 932dd46001
commit 535d88c942

@ -575,16 +575,19 @@ sudo chmod +x /opt/FreeDMR/*.py
sudo chmod +x /opt/FreeDMR/config/*.py
sh /opt/extra-1.sh
sudo systemctl daemon-reload
sudo systemctl restart proxy.service
sudo systemctl restart freedmr.service
sudo systemctl restart fdmrparrot.service
#sudo systemctl restart fdmr_mon.service
sudo systemctl start proxy.service
sudo systemctl start freedmr.service
sudo systemctl start fdmrparrot.service
if systemctl status fdmr_mon.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl restart fdmr_mon.service
then
sudo systemctl stop fdmr_mon.service
sudo systemctl start fdmr_mon.service
fi
if systemctl status fdmr_mon2.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl restart fdmr_mon2.service
then
sudo systemctl stop fdmr_mon2.service
sudo systemctl start fdmr_mon2.service
fi
######
@ -613,26 +616,11 @@ variable5=$(grep "COLOR_2 =" /opt/FDMR-Monitor/fdmr-mon.cfg)
#####################################
if systemctl status http.server-fdmr2.service |grep "active" >/dev/null 2>&1
then systemctl stop http.server-fdmr2.service
fi
if systemctl status http.server-fdmr.service |grep active >/dev/null 2>&1
then sudo systemctl stop http.server-fdmr.service
fi
if systemctl status fdmr_mon2.service |grep active >/dev/null 2>&1
then sudo systemctl stop fdmr_mon2.service
fi
if systemctl status fdmr_mon.service |grep active >/dev/null 2>&1
then sudo systemctl stop fdmr_mon.service
fi
if systemctl status proxy.service |grep "active" >/dev/null 2>&1
then sudo systemctl stop proxy.service
fi
sudo systemctl stop http.server-fdmr2.service
sudo systemctl stop http.server-fdmr.service
sudo systemctl stop fdmr_mon2.service
sudo systemctl stop fdmr_mon.service
sudo systemctl stop proxy.service
##############################################################
# service update
@ -1126,18 +1114,12 @@ if systemctl status mariadb.service |grep disable >/dev/null 2>&1
then sudo systemctl enable mariadb.service
fi
if systemctl status http.server-fdmr2.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl disable http.server-fdmr2.service
fi
sudo systemctl disable http.server-fdmr2.service
if ! systemctl status http.server-fdmr.service | grep "service; enabled;" >/dev/null 2>&1; then
sudo systemctl enable http.server-fdmr.service
fi
if systemctl status fdmr_mon2.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl disable fdmr_mon2.service
fi
sudo systemctl disable fdmr_mon2.service
if ! systemctl status fdmr_mon.service | grep "service; enabled;" >/dev/null 2>&1; then
sudo systemctl enable fdmr_mon.service
fi
@ -1183,26 +1165,12 @@ fi
##############
cd /
if systemctl status http.server-fdmr.service |grep "active" >/dev/null 2>&1
then systemctl stop http.server-fdmr.service
fi
if systemctl status http.server-fdmr2.service |grep active >/dev/null 2>&1
then sudo systemctl stop http.server-fdmr2.service
fi
if systemctl status fdmr_mon.service |grep active >/dev/null 2>&1
then sudo systemctl stop fdmr_mon.service
fi
if systemctl status fdmr_mon2.service |grep active >/dev/null 2>&1
then sudo systemctl stop fdmr_mon2.service
fi
if systemctl status proxy.service |grep "active" >/dev/null 2>&1
then sudo systemctl stop proxy.service
sudo systemctl stop http.server-fdmr.service
sudo systemctl stop http.server-fdmr2.service
sudo systemctl stop fdmr_mon.service
sudo systemctl stop fdmr_mon2.service
sudo systemctl stop proxy.service
fi
##############################################################
# service update
############################################################
@ -1381,18 +1349,12 @@ python3 mon_db.py --update
#####################################
if systemctl status http.server-fdmr.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl disable http.server-fdmr.service
fi
sudo systemctl disable http.server-fdmr.service
if ! systemctl status http.server-fdmr2.service | grep "service; enabled;" >/dev/null 2>&1; then
sudo systemctl enable http.server-fdmr2.service
fi
if systemctl status fdmr_mon.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl disable fdmr_mon.service
fi
sudo systemctl disable fdmr_mon.service
if ! systemctl status fdmr_mon2.service | grep "service; enabled;" >/dev/null 2>&1; then
sudo systemctl enable fdmr_mon2.service
fi

Loading…
Cancel
Save

Powered by TurnKey Linux.