#!/sbin/sh # # Dovecot Secure IMAP/pop server CFG=/opt/csw/etc/dovecot.conf BIN=/opt/csw/sbin/dovecot if [ ! -f $CFG ]; then exit 0; fi case $1 in 'start') $BIN -c $CFG ;; 'stop') pkill -xu root -TERM $BIN ;; 'restart') pkill -xu root -TERM $BIN sleep 2 $BIN -c $CFG ;; *) echo "Usage: $0 {start|stop|restart}" ;; esac