diff options
author | Alin Năstac <mrness@gentoo.org> | 2007-11-14 05:14:56 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2007-11-14 05:14:56 +0000 |
commit | b487199d68a8226e787188fcb0d4e9302da65d38 (patch) | |
tree | 5b03025741973ed97faf283732ec49c4018807c7 /net-proxy/privoxy | |
parent | Remove obsolete version. Correct selector TXT record (#199100). (diff) | |
download | gentoo-2-b487199d68a8226e787188fcb0d4e9302da65d38.tar.gz gentoo-2-b487199d68a8226e787188fcb0d4e9302da65d38.tar.bz2 gentoo-2-b487199d68a8226e787188fcb0d4e9302da65d38.zip |
Set PIDFILE and CONFFILE init script parameters to values based on service name (#199031).
(Portage version: 2.1.3.16)
Diffstat (limited to 'net-proxy/privoxy')
-rw-r--r-- | net-proxy/privoxy/ChangeLog | 6 | ||||
-rw-r--r-- | net-proxy/privoxy/files/privoxy.initd | 17 |
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 $? } |