aboutsummaryrefslogtreecommitdiffstats
path: root/testing/consul/consul.initd
blob: 73613d979c80780aeafa539bc6c41e4e23e2020a (plain)
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
#!/sbin/runscript

name=consul
daemon=/usr/sbin/$name
daemon_user=$name
daemon_group=$name

depend() {
        need net
        after firewall
}

start() {
        ebegin "Starting ${name}"
                start-stop-daemon --start --quiet \
                        -m --pidfile /var/run/${name}.pid \
                        --user ${daemon_user} --group ${daemon_group} \
                        -b -1 /dev/null -2 /dev/null \
			-k 027 --exec ${daemon} -- ${consul_opts}
        eend $?
}

stop() {
        ebegin "Stopping ${name}"
                start-stop-daemon --stop --quiet \
                        --pidfile /var/run/${name}.pid \
                        --exec ${daemon}
        eend $?
}