|
|
|
@ -575,16 +575,19 @@ sudo chmod +x /opt/FreeDMR/*.py
|
|
|
|
sudo chmod +x /opt/FreeDMR/config/*.py
|
|
|
|
sudo chmod +x /opt/FreeDMR/config/*.py
|
|
|
|
sh /opt/extra-1.sh
|
|
|
|
sh /opt/extra-1.sh
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
sudo systemctl restart proxy.service
|
|
|
|
sudo systemctl start proxy.service
|
|
|
|
sudo systemctl restart freedmr.service
|
|
|
|
sudo systemctl start freedmr.service
|
|
|
|
sudo systemctl restart fdmrparrot.service
|
|
|
|
sudo systemctl start fdmrparrot.service
|
|
|
|
#sudo systemctl restart fdmr_mon.service
|
|
|
|
|
|
|
|
if systemctl status fdmr_mon.service |grep "service; enabled;" >/dev/null 2>&1
|
|
|
|
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
|
|
|
|
fi
|
|
|
|
if systemctl status fdmr_mon2.service |grep "service; enabled;" >/dev/null 2>&1
|
|
|
|
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
|
|
|
|
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
|
|
|
|
sudo systemctl stop http.server-fdmr2.service
|
|
|
|
then systemctl stop http.server-fdmr2.service
|
|
|
|
sudo systemctl stop http.server-fdmr.service
|
|
|
|
|
|
|
|
sudo systemctl stop fdmr_mon2.service
|
|
|
|
fi
|
|
|
|
sudo systemctl stop fdmr_mon.service
|
|
|
|
if systemctl status http.server-fdmr.service |grep active >/dev/null 2>&1
|
|
|
|
sudo systemctl stop proxy.service
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################
|
|
|
|
##############################################################
|
|
|
|
# service update
|
|
|
|
# service update
|
|
|
|
@ -1126,18 +1114,12 @@ if systemctl status mariadb.service |grep disable >/dev/null 2>&1
|
|
|
|
then sudo systemctl enable mariadb.service
|
|
|
|
then sudo systemctl enable mariadb.service
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if systemctl status http.server-fdmr2.service |grep "service; enabled;" >/dev/null 2>&1
|
|
|
|
sudo systemctl disable http.server-fdmr2.service
|
|
|
|
then sudo systemctl disable http.server-fdmr2.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! systemctl status http.server-fdmr.service | grep "service; enabled;" >/dev/null 2>&1; then
|
|
|
|
if ! systemctl status http.server-fdmr.service | grep "service; enabled;" >/dev/null 2>&1; then
|
|
|
|
sudo systemctl enable http.server-fdmr.service
|
|
|
|
sudo systemctl enable http.server-fdmr.service
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if systemctl status fdmr_mon2.service |grep "service; enabled;" >/dev/null 2>&1
|
|
|
|
sudo systemctl disable fdmr_mon2.service
|
|
|
|
then sudo systemctl disable fdmr_mon2.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! systemctl status fdmr_mon.service | grep "service; enabled;" >/dev/null 2>&1; then
|
|
|
|
if ! systemctl status fdmr_mon.service | grep "service; enabled;" >/dev/null 2>&1; then
|
|
|
|
sudo systemctl enable fdmr_mon.service
|
|
|
|
sudo systemctl enable fdmr_mon.service
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
@ -1183,26 +1165,12 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
##############
|
|
|
|
##############
|
|
|
|
cd /
|
|
|
|
cd /
|
|
|
|
if systemctl status http.server-fdmr.service |grep "active" >/dev/null 2>&1
|
|
|
|
sudo systemctl stop http.server-fdmr.service
|
|
|
|
then systemctl stop http.server-fdmr.service
|
|
|
|
sudo systemctl stop http.server-fdmr2.service
|
|
|
|
|
|
|
|
sudo systemctl stop fdmr_mon.service
|
|
|
|
fi
|
|
|
|
sudo systemctl stop fdmr_mon2.service
|
|
|
|
if systemctl status http.server-fdmr2.service |grep active >/dev/null 2>&1
|
|
|
|
sudo systemctl stop proxy.service
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
##############################################################
|
|
|
|
##############################################################
|
|
|
|
# service update
|
|
|
|
# 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
|
|
|
|
sudo systemctl disable http.server-fdmr.service
|
|
|
|
then sudo systemctl disable http.server-fdmr.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! systemctl status http.server-fdmr2.service | grep "service; enabled;" >/dev/null 2>&1; then
|
|
|
|
if ! systemctl status http.server-fdmr2.service | grep "service; enabled;" >/dev/null 2>&1; then
|
|
|
|
sudo systemctl enable http.server-fdmr2.service
|
|
|
|
sudo systemctl enable http.server-fdmr2.service
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if systemctl status fdmr_mon.service |grep "service; enabled;" >/dev/null 2>&1
|
|
|
|
sudo systemctl disable fdmr_mon.service
|
|
|
|
then sudo systemctl disable fdmr_mon.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! systemctl status fdmr_mon2.service | grep "service; enabled;" >/dev/null 2>&1; then
|
|
|
|
if ! systemctl status fdmr_mon2.service | grep "service; enabled;" >/dev/null 2>&1; then
|
|
|
|
sudo systemctl enable fdmr_mon2.service
|
|
|
|
sudo systemctl enable fdmr_mon2.service
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|