diff options
Diffstat (limited to 'testing/clapf/clapf.initd')
-rw-r--r-- | testing/clapf/clapf.initd | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/testing/clapf/clapf.initd b/testing/clapf/clapf.initd index eaf2aa49e3..b3e6c6dd90 100644 --- a/testing/clapf/clapf.initd +++ b/testing/clapf/clapf.initd @@ -1,23 +1,27 @@ -#!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: +#!/sbin/openrc-run + +description="Email content filter" +extra_started_commands="reload" + +command="/usr/sbin/clapf" +pidfile="/var/run/clapf/clapf.pid" +CLAPF_CONF="${CLAPF_CONF:-/etc/clapf.conf}" +CLAPF_USER="${CLAPF_USER:-clapf}" +CLAPF_GROUP="${CLAPF_GROUP:-clapf}" +command_user="$CLAPF_USER${CLAPF_GROUP:+:}$CLAPF_GROUP" +command_args="${CLAPF_OPTS:--c $CLAPF_CONF}" +command_background="YES" depend() { need net - use logger + use logger before mta } -start() { - ebegin "Starting clapf" - start-stop-daemon --start --quiet --user clapf --background \ - --exec /usr/sbin/clapf --make-pidfile --pid /var/run/clapf/clapf.pid -- -c /etc/clapf.conf - eend $? -} - -stop() { - ebegin "Stopping clapf" - start-stop-daemon --stop --quiet --pidfile /var/run/clapf/clapf.pid +reload() { + ebegin "Reloading ${name:-$RC_SVCNAME}" + start-stop-daemon --signal HUP \ + ${command:+--exec} $command \ + ${pidfile:+--pidfile} $pidfile eend $? } |