]> git.pld-linux.org Git - packages/courier-imap.git/blobdiff - courier-imap.init
- converted to UTF-8
[packages/courier-imap.git] / courier-imap.init
index c07a15a1310536f261cde4a65c2db798f0fd23a6..2240ffb8fa2cff48e5cadaad1282db193eb5a730 100644 (file)
@@ -1,8 +1,8 @@
 #!/bin/sh
-# IMAP Daemon
+# Courier IMAP Daemon
 #
 # chkconfig:   345 80 20
-# description: IMAP Daemon
+# description: Courier IMAP Daemon
 
 sysconfdir=@sysconfdir@
 libexecdir=@libexecdir@
@@ -14,6 +14,9 @@ sbindir=@sbindir@
 # Get network config
 . /etc/sysconfig/network
 
+# 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 "$1" != stop -a "$1" != status ]; then
@@ -30,24 +33,22 @@ case "$1" in
 start)
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/courier-imap ]; then
-               . $sysconfdir/imapd
-               msg_starting imapd
+               msg_starting "Courier IMAP"
                daemon $libexecdir/imapd.rc start
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-imap
        else
-               msg_already_running imapd
+               msg_already_running "Courier IMAP"
        fi
 ;;
 stop)
        if [ -f /var/lock/subsys/courier-imap ]; then
-               . $sysconfdir/imapd
-               msg_stopping imapd
+               msg_stopping "Courier IMAP"
                daemon $libexecdir/imapd.rc stop
                RETVAL=$?
                rm -f /var/lock/subsys/courier-imap >/dev/null 2>&1
        else
-               msg_not_running imapd
+               msg_not_running "Courier IMAP"
        fi
        ;;
 restart|force-reload)
@@ -56,6 +57,7 @@ restart|force-reload)
        exit $?
        ;;
 status)
+       # FIXME: matches other services, like courier-imap-ssl
        status couriertcpd
        exit $?
        ;;
This page took 0.02967 seconds and 4 git commands to generate.