diff --git a/install.sh b/install.sh index 2b00c97..5e58200 100644 --- a/install.sh +++ b/install.sh @@ -712,13 +712,13 @@ 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 +#Restart=on-failure [Install] WantedBy=multi-user.target @@ -733,13 +733,13 @@ 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 +#Restart=on-failure [Install] WantedBy=multi-user.target @@ -753,12 +753,15 @@ After=network-online.target syslog.target Wants=network-online.target [Service] -#StandardOutput=null +User=root +Type=simple +Restart=always +RestartSec=3 +StandardOutput=null WorkingDirectory=/opt/FreeDMR -#RestartSec=3 ExecStart=/usr/bin/python3 /opt/FreeDMR/playback.py -c /opt/FreeDMR/playback.cfg #Restart=on-abort -Restart=on-failure +#Restart=on-failure [Install] WantedBy=multi-user.target @@ -774,15 +777,15 @@ Description=FDMR Monitor #Wants=network-online.target [Service] -#User=root -#Type=simple -#Restart=always -#RestartSec=3 -#StandardOutput=null +User=root +Type=simple +Restart=always +RestartSec=3 +StandardOutput=null WorkingDirectory=/opt/FDMR-Monitor ExecStart=python3 /opt/FDMR-Monitor/monitor.py #Restart=on-abort -Restart=on-failure +#Restart=on-failure [Install] @@ -869,8 +872,36 @@ 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 #sudo rm mon.db +############################################################## +# 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 +Type=simple +Restart=always +RestartSec=3 +StandardOutput=null +WorkingDirectory=/opt/FDMR-Monitor2 +ExecStart=python3 /opt/FDMR-Monitor2/monitor.py +#Restart=on-abort +#Restart=on-failure + +[Install] +WantedBy=multi-user.target + +EOF +# if systemctl status mariadb.service |grep inactive >/dev/null 2>&1 then sudo systemctl start mariadb.service diff --git a/update.sh b/update.sh index c4d20ad..ef1b9cd 100644 --- a/update.sh +++ b/update.sh @@ -400,7 +400,7 @@ Restart=always RestartSec=3 StandardOutput=null ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py -c /opt/FreeDMR/proxy.cfg -Restart=on-failure +#Restart=on-failure [Install] WantedBy=multi-user.target @@ -419,7 +419,7 @@ Restart=always RestartSec=3 StandardOutput=null ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg -Restart=on-failure +#Restart=on-failure [Install] @@ -434,12 +434,15 @@ After=network-online.target syslog.target Wants=network-online.target [Service] -#StandardOutput=null +User=root +Type=simple +Restart=always +RestartSec=3 +StandardOutput=null WorkingDirectory=/opt/FreeDMR -#RestartSec=3 ExecStart=/usr/bin/python3 /opt/FreeDMR/playback.py -c /opt/FreeDMR/playback.cfg #Restart=on-abort -Restart=on-failure +#Restart=on-failure [Install] WantedBy=multi-user.target @@ -662,11 +665,13 @@ Description=FDMR Monitor [Service] User=root +Type=simple +Restart=always +RestartSec=3 StandardOutput=null WorkingDirectory=/opt/FDMR-Monitor -RestartSec=3 ExecStart=python3 /opt/FDMR-Monitor/monitor.py -Restart=on-abort +#Restart=on-abort #Restart=on-failure [Install] @@ -1314,11 +1319,13 @@ Description=FDMR Monitor2 [Service] User=root +Type=simple +Restart=always +RestartSec=3 StandardOutput=null WorkingDirectory=/opt/FDMR-Monitor2 -RestartSec=3 ExecStart=python3 /opt/FDMR-Monitor2/monitor.py -Restart=on-abort +#Restart=on-abort #Restart=on-failure [Install]