Update update.sh

merge-requests/1/head
Esteban Mackay Q 2 years ago
parent c3657a01cb
commit 40134edb2d

@ -394,11 +394,11 @@ Description= Proxy Service
After=multi-user.target
[Service]
#User=root
#Type=simple
#Restart=always
#RestartSec=3
#StandardOutput=null
User=root
Type=simple
Restart=always
RestartSec=3
StandardOutput=null
ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py -c /opt/FreeDMR/proxy.cfg
Restart=on-failure
@ -413,11 +413,11 @@ Description=FreeDmr
After=multi-user.target
[Service]
#User=root
#Type=simple
#Restart=always
#RestartSec=3
#StandardOutput=null
User=root
Type=simple
Restart=always
RestartSec=3
StandardOutput=null
ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg
Restart=on-failure
@ -600,7 +600,7 @@ cp /opt/FDMR-Monitor2/proxy/proxy.cfg /opt/FreeDMR/proxy.cfg
cp /opt/FDMR-Monitor2/proxy/proxy_db.py /opt/FreeDMR/proxy_db.py
####################
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
sudo systemctl daemon-reload
sudo systemctl start proxy.service
@ -661,15 +661,13 @@ Description=FDMR Monitor
#Wants=network-online.target
[Service]
#User=root
#Type=simple
#Restart=always
#RestartSec=3
#StandardOutput=null
User=root
StandardOutput=null
WorkingDirectory=/opt/FDMR-Monitor
RestartSec=3
ExecStart=python3 /opt/FDMR-Monitor/monitor.py
#Restart=on-abort
Restart=on-failure
Restart=on-abort
#Restart=on-failure
[Install]
WantedBy=multi-user.target
@ -1301,8 +1299,34 @@ sed -i "s/ExecStart=.*/ExecStart=python3 \/opt\/FDMR-Monitor2\/monitor.py/g" /op
sudo cp /opt/FDMR-Monitor2/utils/logrotate/fdmr_mon2 /etc/logrotate.d/fdmr_mon2
sudo cp /opt/FDMR-Monitor2/utils/systemd/fdmr_mon2.service /lib/systemd/system/fdmr_mon2.service
#sudo cp /opt/FDMR-Monitor2/utils/systemd/fdmr_mon2.service /lib/systemd/system/fdmr_mon2.service
##############################################################
# service update
############################################################
cat > /lib/systemd/system/fdmr_mon2.service <<- "EOF"
[Unit]
Description=FDMR Monitor2
# To make the network-online.target available
# systemctl enable systemd-networkd-wait-online.service
#After=network-online.target syslog.target
#Wants=network-online.target
[Service]
User=root
StandardOutput=null
WorkingDirectory=/opt/FDMR-Monitor2
RestartSec=3
ExecStart=python3 /opt/FDMR-Monitor2/monitor.py
Restart=on-abort
#Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
#
systemctl daemon-reload
if systemctl status mariadb.service |grep inactive >/dev/null 2>&1
then sudo systemctl start mariadb.service
@ -1342,8 +1366,6 @@ if [ -z "$variable1" ]
then variable1=80
fi
systemctl daemon-reload &&
systemctl start fdmr_mon2.service
systemctl start proxy.service
sh /opt/extra-3.sh

Loading…
Cancel
Save

Powered by TurnKey Linux.