[Dovecot] startup script

William Ross will at spanner.org
Sun Feb 12 17:33:01 EET 2006


hello,

Lacking any other guidance, I'm using the following minimal sysv  
script to start and stop dovecot. If anyone would like to comment on  
or improve it, I'd be most grateful.

thanks,

will



#!/bin/sh
#
# System V init script for dovecot imap server
# bodged together by will 12.2.06

PIDFILE="/var/run/dovecot/master.pid"
LONGNAME="dovecot imap server"
NAME="dovecot"
DOVECOT='/usr/local/sbin/dovecot'

case $1 in
start)
       echo -n "Starting $LONGNAME";
       dovecot
       echo "...done";
         ;;
stop)
       echo -n "Stopping $LONGNAME"
       PID=`cat $PIDFILE`
       kill $PID
       echo "...done";
         ;;
*)
         N=/etc/init.d/$NAME
         echo "Usage: $N {start|stop}" >&2
         exit 1
         ;;
esac

exit 0

# EOF



More information about the dovecot mailing list