diff --git a/install.sh b/install.sh index 554ae55..5b6fa2b 100644 --- a/install.sh +++ b/install.sh @@ -615,6 +615,11 @@ After=multi-user.target [Service] User=root +Type=simple +Restart=always +RestartSec=3 +StandardOutput=null +ExecStartPre=/bin/sh -c 'until ping -c1 noip.com; do sleep 1; done;' #WorkingDirectory=/opt/FreeDMR ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py @@ -626,16 +631,17 @@ EOF sudo cat > /lib/systemd/system/freedmr.service <<- "EOF" [Unit] Description=FreeDmr - After=multi-user.target [Service] User=root -#ExecStartPre=/bin/sleep 30 +Type=simple +Restart=always +RestartSec=3 +StandardOutput=null +ExecStartPre=/bin/sh -c 'until ping -c1 noip.com; do sleep 1; done;' ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg -r /opt/FreeDMR/config/rules.py - - [Install] WantedBy=multi-user.target