aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tor/tor.initd
diff options
context:
space:
mode:
authorSam Dodrill <shadow.h511@gmail.com>2013-09-02 11:17:47 -0700
committerNatanael Copa <ncopa@alpinelinux.org>2013-09-03 06:10:18 +0000
commitea8a8d1aa1208912fb1dbb2cfa8c6b1046438378 (patch)
tree6ca339422e36d60ef25baaf574ed21c5ee50ee2f /testing/tor/tor.initd
parenta79cb4463ca5bd681640e40fc035f6fe08d14444 (diff)
downloadaports-ea8a8d1aa1208912fb1dbb2cfa8c6b1046438378.tar.gz
aports-ea8a8d1aa1208912fb1dbb2cfa8c6b1046438378.tar.bz2
aports-ea8a8d1aa1208912fb1dbb2cfa8c6b1046438378.tar.xz
testing/tor: new aport
Anonymous network connectivity https://www.torproject.org/ ref #1067
Diffstat (limited to 'testing/tor/tor.initd')
-rw-r--r--testing/tor/tor.initd30
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 $?
+}
+