aboutsummaryrefslogtreecommitdiffstats
path: root/testing/3proxy/3proxy.initd
diff options
context:
space:
mode:
authorsillysausage <sillysausage@privatedemail.net>2015-11-28 22:39:54 +1030
committerNatanael Copa <ncopa@alpinelinux.org>2015-11-30 10:39:34 +0000
commit9267cba0d835098214fe3f9c9d08bb707c03d697 (patch)
tree55ea21cd3a4b9468ee625e10c85604b9caee570d /testing/3proxy/3proxy.initd
parent0c1a61b1b32a1bea394e74d23bd64a18f51ad13a (diff)
downloadaports-9267cba0d835098214fe3f9c9d08bb707c03d697.tar.bz2
aports-9267cba0d835098214fe3f9c9d08bb707c03d697.tar.xz
testing/3proxy: new aport
http://3proxy.ru/ Really tiny cross-platform proxy servers set.
Diffstat (limited to 'testing/3proxy/3proxy.initd')
-rw-r--r--testing/3proxy/3proxy.initd29
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/3proxy/3proxy.initd b/testing/3proxy/3proxy.initd
new file mode 100644
index 0000000000..5c55b05ec0
--- /dev/null
+++ b/testing/3proxy/3proxy.initd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+#
+# Start 3proxy tiny proxy server.
+#
+
+CONFFILE=/etc/${SVCNAME}/${SVCNAME}.cfg
+PIDFILE=/var/run/${SVCNAME}.pid
+
+depend() {
+ need net
+}
+
+start() {
+ if [ ! -f "${CONFFILE}" ]; then
+ eerror "Configuration file ${CONFFILE} not found!"
+ return 1
+ fi
+
+ ebegin "Starting 3proxy"
+ start-stop-daemon --start --quiet --exec /usr/bin/3proxy --pidfile "${PIDFILE}" \
+ -- --pidfile "${PIDFILE}" --user 3proxy.3proxy "${CONFFILE}" #2>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping 3proxy"
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ eend $?
+}