From 1986fe76b7a3d0e11f75ca42804d4cdb15cc853c Mon Sep 17 00:00:00 2001 From: waszi Date: Mon, 29 Jan 2001 15:50:44 +0000 Subject: [PATCH] - updated (NEED TESTING :) Changed files: courier-imap-pop3.init -> 1.1 courier-imap.init -> 1.4 --- courier-imap-pop3.init | 107 +++++++++++++++++++++++++++++++++++++++++ courier-imap.init | 86 +++++++++++++++++++++++---------- 2 files changed, 168 insertions(+), 25 deletions(-) create mode 100644 courier-imap-pop3.init diff --git a/courier-imap-pop3.init b/courier-imap-pop3.init new file mode 100644 index 0000000..01fd066 --- /dev/null +++ b/courier-imap-pop3.init @@ -0,0 +1,107 @@ +#!/bin/sh +# IMAP Daemon +# +# chkconfig: 345 80 20 +# description: IMAP Daemon + +# Source function library +. /etc/rc.d/init.d/functions + +# Get network config +. /etc/sysconfig/network + +ADDRESS=0.0.0.0 +MAXPERIP=4 +MAXDAEMONS=40 +MAILDIR="Maildir" +TCPDOPTS= +POP3DSSLSTART="no" + +# Get service config +[ -f /etc/sysconfig/courier-imap-pop3 ] && . /etc/sysconfig/courier-imap-pop3 + +# Check that networking is up. +if is_no "${NETWORKING}" ; then + msg_Network_Down "Courier IMAP - POP3" + exit 1 +fi + +# See how we were called. +case "$1" in + start) + # Check if the service is already running? + if [ ! -f /var/lock/subsys/courier-imap-pop3 ]; then + msg_starting "Courier IMAP - POP3" + ulimit -d $IMAP_ULIMITD + /usr/bin/env - /bin/sh -c " . /etc/sysconfig/courier-imap-pop3 ; \ + POP3_STARTTLS=$POP3DSTARTTLS ; export POP3_STARTTLS ; \ + `sed -n '/^#/d;/=/p' /dev/null 2>&1; then - touch /var/lock/subsys/courier-imap - ok + msg_starting "Courier IMAP (SSL)" + + if is_yes "$IMAPDSSLSTART"; then + /usr/bin/env - /bin/sh -c " . /etc/sysconfig/courier-imap ; \ + IMAP_TLS=1; export POP3_TLS; \ + `sed -n '/^#/d;/=/p'