X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=courier-imap.init;h=2240ffb8fa2cff48e5cadaad1282db193eb5a730;hb=6c094cd705910403d5eb15625aa5847bf970b944;hp=b4c24eac075d728924e9bdd6f8e130eaf90e1826;hpb=d40fdc68ed6331dcf61a8330a3d81039a2868e57;p=packages%2Fcourier-imap.git diff --git a/courier-imap.init b/courier-imap.init index b4c24ea..2240ffb 100644 --- a/courier-imap.init +++ b/courier-imap.init @@ -1,8 +1,12 @@ #!/bin/sh -# IMAP Daemon +# Courier IMAP Daemon # # chkconfig: 345 80 20 -# description: IMAP Daemon +# description: Courier IMAP Daemon + +sysconfdir=@sysconfdir@ +libexecdir=@libexecdir@ +sbindir=@sbindir@ # Source function library . /etc/rc.d/init.d/functions @@ -10,19 +14,12 @@ # Get network config . /etc/sysconfig/network -ADDRESS=0.0.0.0 -MAXPERIP=4 -MAXDAEMONS=40 -MAILDIR="Maildir" -TCPDOPTS= -IMAPDSSLSTART="no" - # Get service config [ -f /etc/sysconfig/courier-imap ] && . /etc/sysconfig/courier-imap # Check that networking is up. if is_yes "${NETWORKING}"; then - if [ ! -f /var/lock/subsys/network -a != stop -a != status ]; then + if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then msg_network_down "Courier IMAP" exit 1 fi @@ -33,87 +30,38 @@ fi RETVAL=0 # See how we were called. case "$1" in - start) +start) # Check if the service is already running? if [ ! -f /var/lock/subsys/courier-imap ]; then - # start authdaemon, if not running.. - if [ ! -f /var/lock/subsys/authdaemon -a \ - -x /etc/rc.d/init.d/authdaemon ]; then - /etc/rc.d/init.d/authdaemon start - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - msg_starting "Courier IMAP" - fail - exit 1 - fi - fi msg_starting "Courier IMAP" - busy - ulimit -d $IMAP_ULIMITD - /usr/bin/env - /bin/sh -c " . /etc/sysconfig/courier-imap ; \ - `sed -n '/^#/d;/=/p' /dev/null 2>&1 else msg_not_running "Courier IMAP" fi ;; - restart|force-reload) +restart|force-reload) $0 stop $0 start exit $? ;; - status) +status) + # FIXME: matches other services, like courier-imap-ssl status couriertcpd exit $? ;; - *) +*) msg_usage "$0 {start|stop|restart|force-reload|status}" exit 3 esac