1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00
freebsd-ports/mail/mixminion/files/mixminiond.in
Marcus Alves Grando 15a471a88f - Update to 0.0.8alpha2
- Add rc.d script
- portlint(1)

PR:		93371
Submitted by:	Peter Thoenen <eol1@yahoo.com>
Approved by:	maintainer
2006-03-15 13:42:22 +00:00

66 lines
1.4 KiB
Bash

#!/bin/sh
#
# $FreeBSD$
#
# REQUIRE: NETWORKING SERVERS USR
# BEFORE: LOGIN
#
# Add the following lines to /etc/rc.conf to enable mixminiond
#
# mixminiond_enable (bool): Set to "NO" by default
# Set it to "YES" to enable mixminiond
# mixminiond_conf (str): Points to your mixminiond conf file
# Default: %%PREFIX%%/etc/mixminiond.conf
# mixminiond_user (str): Mixminiond user. Default _mixminion
#
. %%RC_SUBR%%
name="mixminiond"
rcvar=${name}_enable
load_rc_config ${name}
: ${mixminiond_enable="NO"}
: ${mixminiond_conf="%%PREFIX%%/etc/mixminiond.conf"}
: ${mixminiond_user="_mixminion"}
: ${mixminiond_pidfile="/var/run/mixminion/mixminion.pid"}
required_files=${mixminiond_conf}
required_dirs=/var/spool/mixminion
command="%%PREFIX%%/bin/${name}"
extra_commands="reload republish DELKEYS stats upgrade"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
reload_cmd="${name}_reload"
republish_cmd="${name}_republish"
DELKEYS_cmd="${name}_DELKEYS"
stats_cmd="${name}_stats"
mixminiond_start() {
su ${mixminiond_user} -c "${command} start -f ${mixminiond_conf} --daemon"
}
mixminiond_stop() {
${command} stop -f ${mixminiond_conf}
run_rc_command poll
}
mixminiond_reload() {
${command} server-reload -f ${mixminiond_conf}
}
mixminiond_republish() {
${command} republish -f ${mixminiond_conf}
}
mixminiond_DELKEYS() {
${command} DELKEYS -f ${mixminiond_conf}
}
mixminiond_stats() {
${command} stats -f ${mixminiond_conf}
}
run_rc_command "$1"