Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 199031 - net-proxy/privoxy - privoxy init script needs start-stop-daemon create pidfile
Summary: net-proxy/privoxy - privoxy init script needs start-stop-daemon create pidfile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-13 11:52 UTC by konsti
Modified: 2007-11-14 08:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description konsti 2007-11-13 11:52:02 UTC
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 konsti 2007-11-13 11:52:44 UTC
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 Alin Năstac (RETIRED) gentoo-dev 2007-11-14 05:22:40 UTC
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 konsti 2007-11-14 08:59:37 UTC
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...