|
|
|
@ -712,13 +712,13 @@ Description= Proxy Service
|
|
|
|
After=multi-user.target
|
|
|
|
After=multi-user.target
|
|
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
[Service]
|
|
|
|
#User=root
|
|
|
|
User=root
|
|
|
|
#Type=simple
|
|
|
|
Type=simple
|
|
|
|
#Restart=always
|
|
|
|
Restart=always
|
|
|
|
#RestartSec=3
|
|
|
|
RestartSec=3
|
|
|
|
#StandardOutput=null
|
|
|
|
StandardOutput=null
|
|
|
|
ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py -c /opt/FreeDMR/proxy.cfg
|
|
|
|
ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py -c /opt/FreeDMR/proxy.cfg
|
|
|
|
Restart=on-failure
|
|
|
|
#Restart=on-failure
|
|
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
@ -733,13 +733,13 @@ Description=FreeDmr
|
|
|
|
After=multi-user.target
|
|
|
|
After=multi-user.target
|
|
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
[Service]
|
|
|
|
#User=root
|
|
|
|
User=root
|
|
|
|
#Type=simple
|
|
|
|
Type=simple
|
|
|
|
#Restart=always
|
|
|
|
Restart=always
|
|
|
|
#RestartSec=3
|
|
|
|
RestartSec=3
|
|
|
|
#StandardOutput=null
|
|
|
|
StandardOutput=null
|
|
|
|
ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg
|
|
|
|
ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg
|
|
|
|
Restart=on-failure
|
|
|
|
#Restart=on-failure
|
|
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
@ -753,12 +753,15 @@ After=network-online.target syslog.target
|
|
|
|
Wants=network-online.target
|
|
|
|
Wants=network-online.target
|
|
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
[Service]
|
|
|
|
#StandardOutput=null
|
|
|
|
User=root
|
|
|
|
|
|
|
|
Type=simple
|
|
|
|
|
|
|
|
Restart=always
|
|
|
|
|
|
|
|
RestartSec=3
|
|
|
|
|
|
|
|
StandardOutput=null
|
|
|
|
WorkingDirectory=/opt/FreeDMR
|
|
|
|
WorkingDirectory=/opt/FreeDMR
|
|
|
|
#RestartSec=3
|
|
|
|
|
|
|
|
ExecStart=/usr/bin/python3 /opt/FreeDMR/playback.py -c /opt/FreeDMR/playback.cfg
|
|
|
|
ExecStart=/usr/bin/python3 /opt/FreeDMR/playback.py -c /opt/FreeDMR/playback.cfg
|
|
|
|
#Restart=on-abort
|
|
|
|
#Restart=on-abort
|
|
|
|
Restart=on-failure
|
|
|
|
#Restart=on-failure
|
|
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
@ -774,15 +777,15 @@ Description=FDMR Monitor
|
|
|
|
#Wants=network-online.target
|
|
|
|
#Wants=network-online.target
|
|
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
[Service]
|
|
|
|
#User=root
|
|
|
|
User=root
|
|
|
|
#Type=simple
|
|
|
|
Type=simple
|
|
|
|
#Restart=always
|
|
|
|
Restart=always
|
|
|
|
#RestartSec=3
|
|
|
|
RestartSec=3
|
|
|
|
#StandardOutput=null
|
|
|
|
StandardOutput=null
|
|
|
|
WorkingDirectory=/opt/FDMR-Monitor
|
|
|
|
WorkingDirectory=/opt/FDMR-Monitor
|
|
|
|
ExecStart=python3 /opt/FDMR-Monitor/monitor.py
|
|
|
|
ExecStart=python3 /opt/FDMR-Monitor/monitor.py
|
|
|
|
#Restart=on-abort
|
|
|
|
#Restart=on-abort
|
|
|
|
Restart=on-failure
|
|
|
|
#Restart=on-failure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
[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/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
|
|
|
|
#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
|
|
|
|
if systemctl status mariadb.service |grep inactive >/dev/null 2>&1
|
|
|
|
then sudo systemctl start mariadb.service
|
|
|
|
then sudo systemctl start mariadb.service
|
|
|
|
|
|
|
|
|
|
|
|
|