Bug 199031 - net-proxy/privoxy - privoxy init script needs start-stop-daemon create pidfile
Bug#: 199031 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: net-proxy@gentoo.org Reported By: konsti@ludenkalle.de
Component: Ebuilds
URL: 
Summary: net-proxy/privoxy - privoxy init script needs start-stop-daemon create pidfile
Keywords:  
Status Whiteboard: 
Opened: 2007-11-13 11:52 0000
Description:   Opened: 2007-11-13 11:52 0000
I have two privoxys running, one vanilla and one cloned with all -tor appended
to config file name, log dir name and pidfile name. Therefore I need to move
the "--" in the init.d script to let start-stop-daemon create the pidfile.
Otherwise the second privoxy instance claims to be already running.

------- Comment #1 From konsti@ludenkalle.de 2007-11-13 11:52:44 0000 -------
copy & paste works not for an attachment, inline version:

--- privoxy.orig        2007-11-13 12:48:48.000000000 +0100
+++ privoxy     2007-11-13 07:14:03.000000000 +0100
@@ -9,8 +9,8 @@

 start() {
        ebegin "Starting privoxy"
-       start-stop-daemon --start --quiet --exec /usr/sbin/privoxy -- \
-               --pidfile /var/run/privoxy.pid \
+       start-stop-daemon --start --quiet --exec /usr/sbin/privoxy \
+               --pidfile /var/run/privoxy.pid -- \
                --user privoxy.privoxy  /etc/privoxy/config 2>/dev/null
        eend $?
 }

------- Comment #2 From Alin Năstac 2007-11-14 05:22:40 0000 -------
I've modified the init script. Now the configuration file (as well as the
pidfile) is selected based on the service name. You could duplicate your
configuration like this:
 ln -s privoxy /etc/init.d/privoxy-tor
 cp -ar /etc/privoxy /etc/privoxy-tor

Since I expect to be used by a very small minority of users, I didn't bumped
the version, therefore you will have to re-emerge privoxy.

------- Comment #3 From konsti@ludenkalle.de 2007-11-14 08:59:37 0000 -------
Yeah cool, this works fine and it feels like a much more clean solution!
Not increasing the version is okay since not much people used such a config,
they would have complained otherwise. I am investigating techniques to
anonymize and crypt as much as possible here now, since in Germany freedom and
democracy has been abandoned on last Friday. May be more people show up with
such crazy configs in future...