70 lines
2.0 KiB
Plaintext
70 lines
2.0 KiB
Plaintext
|
#!/sbin/runscript
|
||
|
#
|
||
|
# zarafa-dagent Zarafa Outlook Sharing LMTP Delivery agent
|
||
|
#
|
||
|
# chkconfig: - 86 24
|
||
|
# description: The Zarafa Delivery agent in LMTP mode can be used to \
|
||
|
# run the zarafa-dagent in daemon mode and let your SMTP \
|
||
|
# server connect to it to deliver email to users using \
|
||
|
# the LMTP protocol. The Zarafa Delivery agent can also \
|
||
|
# be used as a standalone program.
|
||
|
# processname: /usr/bin/zarafa-dagent
|
||
|
# config: /etc/zarafa/dagent.cfg
|
||
|
# pidfile: /var/run/zarafa-dagent.pid
|
||
|
|
||
|
### BEGIN INIT INFO
|
||
|
# Provides: zarafa-dagent
|
||
|
# Required-Start: $local_fs $network $remote_fs $syslog
|
||
|
# Required-Stop: $local_fs $network $remote_fs $syslog
|
||
|
# Should-Start: zarafa-server
|
||
|
# Should-Stop: zarafa-server
|
||
|
# Short-Description: Zarafa Outlook Sharing LMTP Delivery agent
|
||
|
# Description: The Zarafa Delivery agent in LMTP mode can be used to run
|
||
|
# the zarafa-dagent in daemon mode and let your SMTP server
|
||
|
# connect to it to deliver email to users using the LMTP
|
||
|
# protocol. The Zarafa Delivery agent can also be used as a
|
||
|
# standalone program.
|
||
|
### END INIT INFO
|
||
|
|
||
|
DAGENTCONFIG=/etc/zarafa/dagent.cfg
|
||
|
DAGENTPROGRAM=/usr/bin/zarafa-dagent
|
||
|
|
||
|
# Sanity checks.
|
||
|
[ -x $DAGENTPROGRAM ] || exit 0
|
||
|
|
||
|
# the -d option is required to run LMTP mode deamonized
|
||
|
DAGENTCONFIG_OPT="-d"
|
||
|
[ ! -z $DAGENTCONFIG -a -f $DAGENTCONFIG ] && DAGENTCONFIG_OPT="$DAGENTCONFIG_OPT -c $DAGENTCONFIG"
|
||
|
|
||
|
PIDFILE=/var/run/"${SVCNAME}".pid
|
||
|
|
||
|
opts="${opts} reload"
|
||
|
|
||
|
depend() {
|
||
|
need mta
|
||
|
}
|
||
|
|
||
|
start() {
|
||
|
ebegin "Starting ${SVCNAME}"
|
||
|
start-stop-daemon --start \
|
||
|
--pidfile ${PIDFILE} \
|
||
|
--exec ${DAGENTPROGRAM} -- ${DAGENTCONFIG_OPT}
|
||
|
eend $?
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
ebegin $"Stopping ${SVCNAME}"
|
||
|
start-stop-daemon --stop \
|
||
|
--pidfile ${PIDFILE} \
|
||
|
--exec ${DAGENTPROGRAM} -- ${DAGENTCONFIG_OPT}
|
||
|
eend $?
|
||
|
}
|
||
|
|
||
|
reload() {
|
||
|
ebegin $"Reloading ${SVCNAME}"
|
||
|
start-stop-daemon --stop --signal HUP --oknodo\
|
||
|
--pidfile ${PIDFILE} \
|
||
|
--exec ${DAGENTPROGRAM}
|
||
|
eend $?
|
||
|
}
|