-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathdcp-loader-suse
56 lines (43 loc) · 928 Bytes
/
dcp-loader-suse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
### BEGIN INIT INFO
# Provides: dnscrypt-proxy
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: dnscrypt-loader
# Description: dnscrypt-proxy daemon loader
### END INIT INFO
# Path to executables
PATH=${PATH}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Source function library.
. /etc/rc.status
# First reset status of this service
rc_reset
start() {
start_daemon /usr/local/sbin/dnscrypt-loader -d
}
stop() {
start_daemon /usr/local/sbin/dnscrypt-loader -q
}
status() {
start_daemon /usr/local/sbin/dnscrypt-loader -s
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
esac
exit 0