summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-proxy/privoxy/ChangeLog6
-rw-r--r--net-proxy/privoxy/files/privoxy.initd17
2 files changed, 17 insertions, 6 deletions
diff --git a/net-proxy/privoxy/ChangeLog b/net-proxy/privoxy/ChangeLog
index a2cfad4a8004..9d504e77f957 100644
--- a/net-proxy/privoxy/ChangeLog
+++ b/net-proxy/privoxy/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-proxy/privoxy
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/ChangeLog,v 1.26 2007/11/04 08:20:50 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/ChangeLog,v 1.27 2007/11/14 05:14:55 mrness Exp $
+
+ 14 Nov 2007; Alin Năstac <mrness@gentoo.org> files/privoxy.initd:
+ Set PIDFILE and CONFFILE init script parameters to values based on service
+ name (#199031).
04 Nov 2007; Alin Năstac <mrness@gentoo.org> privoxy-3.0.6.ebuild:
Remove useless pkg_preinst function.
diff --git a/net-proxy/privoxy/files/privoxy.initd b/net-proxy/privoxy/files/privoxy.initd
index 279a1f1abbbb..84d6186d981d 100644
--- a/net-proxy/privoxy/files/privoxy.initd
+++ b/net-proxy/privoxy/files/privoxy.initd
@@ -1,22 +1,29 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/files/privoxy.initd,v 1.1 2007/06/17 07:06:38 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/files/privoxy.initd,v 1.2 2007/11/14 05:14:56 mrness Exp $
+
+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 privoxy"
- start-stop-daemon --start --quiet --exec /usr/sbin/privoxy -- \
- --pidfile /var/run/privoxy.pid \
- --user privoxy.privoxy /etc/privoxy/config 2>/dev/null
+ start-stop-daemon --start --quiet --exec /usr/sbin/privoxy --pidfile "${PIDFILE}" \
+ -- --pidfile "${PIDFILE}" --user privoxy.privoxy "${CONFFILE}" #2>/dev/null
eend $?
}
stop() {
ebegin "Stopping privoxy"
- start-stop-daemon --stop --quiet --pidfile /var/run/privoxy.pid
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
eend $?
}