diff options
Diffstat (limited to 'testing/tor/tor.initd')
-rw-r--r-- | testing/tor/tor.initd | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/tor/tor.initd b/testing/tor/tor.initd new file mode 100644 index 0000000000..4a26c1dad5 --- /dev/null +++ b/testing/tor/tor.initd @@ -0,0 +1,30 @@ +#!/sbin/runscript + +# Sample init.d file for alpine linux. + +name=tor +daemon=/usr/bin/$name + +depend() { + need net + after firewall + provide $name +} + +start() { + ebegin "Starting ${name}" + start-stop-daemon --start --quiet \ + --pidfile /var/run/${name}.pid \ + -u ${name} \ + --exec ${daemon} -- --runasdaemon 1 + eend $? +} + +stop() { + ebegin "Stopping ${name}" + start-stop-daemon --stop --quiet \ + --pidfile /var/run/$name.pid \ + --exec ${daemon} + eend $? +} + |