You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-proxy/privoxy/files/privoxy.initd-3

29 lines
639 B

#!/sbin/openrc-run
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
CONFFILE=/etc/${SVCNAME}/config
PIDFILE=/var/run/${SVCNAME}.pid
depend() {
use net
}
start() {
if [ ! -f "${CONFFILE}" ]; then
eerror "Configuration file ${CONFFILE} not found!"
return 1
fi
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --quiet --exec /usr/sbin/privoxy --pidfile "${PIDFILE}" \
-- --pidfile "${PIDFILE}" --user privoxy.privoxy "${CONFFILE}" #2>/dev/null
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
eend $?
}