diff options
author | Cedric Schieli <cschieli@gmail.com> | 2010-06-01 12:37:47 +0000 |
---|---|---|
committer | Cedric Schieli <cschieli@gmail.com> | 2010-06-01 12:37:47 +0000 |
commit | 10b8b99e48384b4470cac1330080c12d2ade01de (patch) | |
tree | 7bb4ad6cd94a2c9a960fd9a4532d123eee5151d5 /testing/privoxy/privoxy.initd | |
parent | 9252f1cfd78299b137400ed8169a79f7f833daac (diff) | |
parent | c6c0b6f9dbde1244e7b31f74c703178a867e873f (diff) | |
download | aports-to-upstream.tar.bz2 aports-to-upstream.tar.xz |
Merge remote branch 'upstream/master' into to-upstreamto-upstream
Diffstat (limited to 'testing/privoxy/privoxy.initd')
-rw-r--r-- | testing/privoxy/privoxy.initd | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/privoxy/privoxy.initd b/testing/privoxy/privoxy.initd new file mode 100644 index 00000000..ef984ea3 --- /dev/null +++ b/testing/privoxy/privoxy.initd @@ -0,0 +1,32 @@ +#!/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.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 "${PIDFILE}" \ + -- \ + --pidfile "${PIDFILE}" \ + --user privoxy.privoxy "${CONFFILE}" + eend $? +} + +stop() { + ebegin "Stopping privoxy" + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + eend $? +} |