diff options
Diffstat (limited to 'mail-mta/citadel/files/citadel.init')
-rw-r--r-- | mail-mta/citadel/files/citadel.init | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mail-mta/citadel/files/citadel.init b/mail-mta/citadel/files/citadel.init new file mode 100644 index 0000000..7d76679 --- /dev/null +++ b/mail-mta/citadel/files/citadel.init @@ -0,0 +1,36 @@ +#!/sbin/runscript + +# original Author: Wilfried Goesgens <citadel@outgesourced.org> +# adapted for Gentoo: the_mgt <themgt@mail.ru> + +depend() { + use dns logger + need net + provide mta +} + +RUNDIR="/var/run/citadel" +DAEMON="/usr/sbin/citserver" +PIDFILE="${RUNDIR}/citadel.pid" +SENDCOMMAND="/usr/sbin/sendcommand" + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +svc_start() { + ebegin "Starting citserver" + start-stop-daemon --start --exec /usr/sbin/citserver -- ${CITSERVER_OPTS} + eend $? +} + +svc_stop() { + ebegin "Stopping citserver" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} + eend $? +} + +restart() { + ebegin "Restarting citserver" + svc_stop && sleep 3 && svc_start + eend $? "Failed to restart Citadel" +} |