aboutsummaryrefslogtreecommitdiffstats
path: root/testing/consul/consul.initd
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-04-28 13:27:48 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2015-04-28 13:29:23 +0200
commitc05fd0282aa9d14f15690308761caf93805285f7 (patch)
tree8856d40dc52a8b3b1437584ad5fdc14c72e79996 /testing/consul/consul.initd
parent15a3137ad2d71eea7ea9ea8d6a912545a36947b2 (diff)
downloadaports-c05fd0282aa9d14f15690308761caf93805285f7.tar.bz2
aports-c05fd0282aa9d14f15690308761caf93805285f7.tar.xz
testing/consul: new aport
APKBUILD provided by Olivier Mauras <olivier@mauras.ch>
Diffstat (limited to 'testing/consul/consul.initd')
-rw-r--r--testing/consul/consul.initd30
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/consul/consul.initd b/testing/consul/consul.initd
new file mode 100644
index 0000000000..73613d979c
--- /dev/null
+++ b/testing/consul/consul.initd
@@ -0,0 +1,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 $?
+}
+