diff options
Diffstat (limited to 'main/opentracker/opentracker.initd')
-rw-r--r-- | main/opentracker/opentracker.initd | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/main/opentracker/opentracker.initd b/main/opentracker/opentracker.initd new file mode 100644 index 0000000000..33d2817787 --- /dev/null +++ b/main/opentracker/opentracker.initd @@ -0,0 +1,38 @@ +#!/sbin/runscript + +# 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 $? +} + |