#!/bin/bash # $Header: /root/magellan-cvs/src/dovecot/dovecot.rc,v 1.2 2010-03-04 15:37:25 niro Exp $ #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k #%start: 70 #%stop: 80 #deps #%needs: #%before: #%after: source /etc/conf.d/rc source $rc_functions case "$1" in start) echo -e ${COLOREDSTAR}"Starting dovecot ..." start-stop-daemon --start --exec /usr/sbin/dovecot \ --pidfile /var/run/dovecot/master.pid evaluate_retval update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) echo -e ${COLOREDSTAR}"Stopping dovecot ..." start-stop-daemon --stop --exec /usr/sbin/dovecot \ --pidfile /var/run/dovecot/master.pid evaluate_retval update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; reload) echo -e ${COLOREDSTAR}"Reloading dovecot configuration ..." start-stop-daemon --stop --oknodo --exec /usr/sbin/dovecot \ --pidfile /var/run/dovecot/master.pid --signal HUP evaluate_retval ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/dovecot ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac