Browse Source

Make: update script mode

Nick Peng 4 years ago
parent
commit
106ec6789c
2 changed files with 24 additions and 0 deletions
  1. 5 0
      package/build-pkg.sh
  2. 19 0
      systemd/smartdns.service

+ 5 - 0
package/build-pkg.sh

@@ -0,0 +1,5 @@
+.vscode
+.o
+.DS_Store
+.swp.
+smartdns

+ 19 - 0
systemd/smartdns.service

@@ -0,0 +1,19 @@
+[Unit]
+Description=SmartDNS Server
+After=network.target 
+StartLimitBurst=0
+StartLimitIntervalSec=60
+
+[Service]
+Type=forking
+PIDFile=/var/run/smartdns.pid
+EnvironmentFile=/etc/default/smartdns
+ExecStart=/usr/sbin/smartdns -p /var/run/smartdns.pid $SMART_DNS_OPTS 
+KillMode=process
+Restart=always
+RestartSec=2
+TimeoutStopSec=5
+
+[Install]
+WantedBy=multi-user.target
+Alias=smartdns.service