aboutsummaryrefslogtreecommitdiffstats
path: root/community/opentracker/opentracker.initd
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-11-02 15:45:51 +0200
committerTimo Teräs <timo.teras@iki.fi>2016-11-02 15:45:51 +0200
commitb115eb45f2289ac64889d195c87873e24ccf11bb (patch)
treef9bdfdff6aaffd8a39c4e985202c390c6abfca38 /community/opentracker/opentracker.initd
parent1a10c24e73376bce82d24f506833033b2288850a (diff)
downloadaports-b115eb45f2289ac64889d195c87873e24ccf11bb.tar.bz2
aports-b115eb45f2289ac64889d195c87873e24ccf11bb.tar.xz
community/opentracker: move from main
depends on libowfat which is in community
Diffstat (limited to 'community/opentracker/opentracker.initd')
-rw-r--r--community/opentracker/opentracker.initd38
1 files changed, 38 insertions, 0 deletions
diff --git a/community/opentracker/opentracker.initd b/community/opentracker/opentracker.initd
new file mode 100644
index 000000000..548be7a20
--- /dev/null
+++ b/community/opentracker/opentracker.initd
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+
+# Sample init.d file for alpine linux.
+
+name=opentracker
+daemon=/usr/bin/$name
+conf=${opentracker_conf:-/etc/opentracker/opentracker.conf}
+pidfile=/var/run/opentracker.pid
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --quiet \
+ --make-pidfile \
+ --pidfile ${pidfile} \
+ --background \
+ --stdout /dev/null \
+ --stderr /dev/null \
+ --exec ${daemon} \
+ -- \
+ -d /var/empty \
+ -f $conf \
+ -u ${opentracker_user:-opentracker} \
+ ${opentracker_opts}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --quiet --pidfile ${pidfile} \
+ --exec ${daemon}
+ eend $?
+}
+