No manual editing of service file requred. Start service after network.

pull/1/head
Geoffrey Merck 6 years ago
parent ddc75880ed
commit 2953ce49ec

@ -32,9 +32,11 @@ newhostfiles :
/usr/bin/wget http://www.pistar.uk/downloads/DCS_Hosts.txt && sudo /bin/mv -f DCS_Hosts.txt $(CFGDIR) /usr/bin/wget http://www.pistar.uk/downloads/DCS_Hosts.txt && sudo /bin/mv -f DCS_Hosts.txt $(CFGDIR)
install : sgs-xl install : sgs-xl
/bin/mkdir -p $(CFGDIR)
/bin/cp -f sgs-xl.cfg $(CFGDIR) /bin/cp -f sgs-xl.cfg $(CFGDIR)
/bin/cp -f sgs-xl $(BINDIR) /bin/cp -f sgs-xl $(BINDIR)
/bin/cp -f sgs-xl.service /lib/systemd/system /bin/cp -f sgs-xl.service /lib/systemd/system
/usr/bin/sed -i "s|REPLACEME|/usr/sbin/sgs-xl /etc/sgs-xl/sgs-xl.cfg|g" /lib/systemd/system/sgs-xl.service
systemctl enable sgs-xl.service systemctl enable sgs-xl.service
systemctl daemon-reload systemctl daemon-reload
systemctl start sgs-xl.service systemctl start sgs-xl.service
@ -45,7 +47,7 @@ uninstall :
/bin/rm -f /lib/systemd/system/sgs-xl.service /bin/rm -f /lib/systemd/system/sgs-xl.service
systemctl daemon-reload systemctl daemon-reload
/bin/rm -f $(BINDIR)/sgs-xl /bin/rm -f $(BINDIR)/sgs-xl
/bin/rm -f $(CFGDIR)/sgs-xl.cfg /bin/rm -rf $(CFGDIR)
removehostfiles : removehostfiles :
/bin/rm -f $(CFGDIR)/DExtra_Hosts.txt /bin/rm -f $(CFGDIR)/DExtra_Hosts.txt

@ -1,10 +1,11 @@
[Unit] [Unit]
Description=Smart Group Server Description=Smart Group Server
After=systemd-user-session.service After=network-online.target
Wants=network-online.target
[Service] [Service]
Type=simple Type=simple
ExecStart=/usr/local/bin/sgs /usr/local/etc/sgs.cfg ExecStart=REPLACEME
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

Loading…
Cancel
Save

Powered by TurnKey Linux.