[Dovecot] Init.d boot scripts??

Dirk Essl dirk at essl.de
Tue Apr 3 01:59:23 EEST 2007


rodman at thefrowerts.com wrote:
> Hello,
> 
> Trying to figure out how to get dovecot to startup at boot. I saw the
> Ubuntu script on the dovecot site, but that didn't work on my system (SuSe
> 10.2). Of course, copying the /usr/local/sbin/dovecot file into
> /etc/init.d doesn't work at all.  Any one have working SuSe script??

I don't have a SuSE script, but I use something like this on Solaris
just adjust CFG and BIN to fit your needs

----begin----

#!/bin/sh
#
# Dovecot Secure IMAP/pop server

## please configure to fit your needs here
CFG=/etc/dovecot.conf
BIN=/usr/local/sbin/dovecot
PROC=dovecot
## configuration ends
if [ ! -f $CFG ]; then
         exit 0;
fi

case $1 in

'start')
         $BIN -c $CFG
         ;;
'stop')
         pkill -KILL $PROC
         ;;
'restart')
         pkill -KILL $PROC
         sleep 2
         $BIN -c $CFG
         ;;
*)      echo "Usage: $0 {start|stop|restart}"
         ;;
esac

----end----


> Rodman
> 
dirk


More information about the dovecot mailing list