[Dovecot] INIT startup script for Fedora Core 5
Bill Landry
billl at inetmsg.com
Sat Nov 4 15:48:29 UTC 2006
jaysen at emtjaysen.net wrote:
> Does anyone have an init script for dovecot that will work with Fedora
> Core 5 so that it will startup automatically on boot? I can't seem to
> find one so If you have one I would appreciate it if you could send it
> to me.
>
> Thank You
>
> Jaysen
This is what I use on my Fedora Core 3 server (should work fine of Core
5, as well):
=====
#!/bin/sh
# description: Dovecot IMAP Server
# processname: dovecot
# chkconfig: - 54 54
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
[ -x /usr/local/sbin/dovecot ] || exit 0
PATH=$PATH:/usr/local/sbin
case "$1" in
start)
echo -n "Starting Dovecot Daemon: "
daemon dovecot
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dovecot
;;
stop)
echo -n "Stopping Dovecot Daemon: "
killproc dovecot
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dovecot
;;
status)
status dovecot
RETVAL=$?
;;
restart)
echo -n "Restarting Dovecot: "
$0 stop
$0 start
RETVAL=$?
;;
*)
echo "Usage: dovecot {start|stop|status|restart}"
exit 1
esac
exit $RETVAL
=====
HTH,
Bill
More information about the dovecot
mailing list