We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80079ae commit 150ed3eCopy full SHA for 150ed3e
2 files changed
rootfs/etc/systemd/system/smartdns.service
@@ -5,9 +5,9 @@ After=network.target
5
[Service]
6
User=root
7
Group=root
8
-WorkingDirectory={smartdns_path}
+WorkingDirectory=/usr/local/smartdns/script
9
ExecStart=/bin/sh run_dns.sh
10
-ExecReload=/bin/kill -s HUP $MAINPID
+ExecReload=/bin/sh reload_dns.sh
11
ExecStop=/bin/kill -s TERM $MAINPID
12
EnvironmentFile=/etc/environment
13
PrivateTmp=true
script/reload_dns.sh
@@ -0,0 +1,9 @@
1
+#!/bin/bash
2
+
3
+set -e
4
+filepath=$(cd "$(dirname "$0")"; pwd)
+chmod a+r $filepath/../sdns.pid &>/dev/null
+pid=`cat $filepath/../sdns.pid 2>/dev/null`
+kill -s HUP ${pid}
0 commit comments