summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-proxy/ziproxy/files/ziproxy.initd')
-rw-r--r--net-proxy/ziproxy/files/ziproxy.initd26
1 files changed, 26 insertions, 0 deletions
diff --git a/net-proxy/ziproxy/files/ziproxy.initd b/net-proxy/ziproxy/files/ziproxy.initd
new file mode 100644
index 000000000000..6b0cb89bce32
--- /dev/null
+++ b/net-proxy/ziproxy/files/ziproxy.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ local OPT="-d"
+ ebegin "Starting ${SVCNAME}"
+
+ [ -n "${CONFIG}" ] && OPT="${OPT} -c ${CONFIG}"
+ [ -n "${ONLYFROM}" ] && OPT="${OPT} -f ${ONLYFROM}"
+
+ start-stop-daemon --start --pidfile /var/run/${SVCNAME}.pid \
+ --chuid ziproxy:ziproxy --exec /usr/sbin/ziproxy -- ${OPT} > /var/run/${SVCNAME}.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile /var/run/${SVCNAME}.pid
+ eend $?
+}