summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2016-04-22 14:42:24 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2016-04-22 14:42:24 +0300
commit1a9d88981bc2dfdb828c9f0b509092634a6ffc87 (patch)
treefd00dc5b627eb6deace3b4c5c3c1cdd7d4fabf78 /net-proxy/privoxy/files
parentAdd missing build-time dependency on dev-python/setuptools (diff)
downloadgentoo-1a9d88981bc2dfdb828c9f0b509092634a6ffc87.tar.gz
gentoo-1a9d88981bc2dfdb828c9f0b509092634a6ffc87.tar.bz2
gentoo-1a9d88981bc2dfdb828c9f0b509092634a6ffc87.zip
net-proxy/privoxy: honor multiple instances for ebegin/eend
Use ${SVCNAME} for ebegin/eend messages, see bug 580278. Package-Manager: portage-2.2.28 Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'net-proxy/privoxy/files')
-rw-r--r--net-proxy/privoxy/files/privoxy.initd-229
1 files changed, 29 insertions, 0 deletions
diff --git a/net-proxy/privoxy/files/privoxy.initd-2 b/net-proxy/privoxy/files/privoxy.initd-2
new file mode 100644
index 000000000000..beb32cf5ef6a
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy.initd-2
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CONFFILE=/etc/${SVCNAME}/config
+PIDFILE=/var/run/${SVCNAME}.pid
+
+depend() {
+ need net
+}
+
+start() {
+ if [ ! -f "${CONFFILE}" ]; then
+ eerror "Configuration file ${CONFFILE} not found!"
+ return 1
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/privoxy --pidfile "${PIDFILE}" \
+ -- --pidfile "${PIDFILE}" --user privoxy.privoxy "${CONFFILE}" #2>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ eend $?
+}