r3170 - in trunk/bootscripts: . blfs/init.d

dj at linuxfromscratch.org dj at linuxfromscratch.org
Sun Jan 2 02:49:04 PST 2005


Author: dj
Date: 2005-01-02 03:49:04 -0700 (Sun, 02 Jan 2005)
New Revision: 3170

Added:
   trunk/bootscripts/blfs/init.d/courier
Modified:
   trunk/bootscripts/ChangeLog
   trunk/bootscripts/Makefile
Log:
Added courier bootscript.

Modified: trunk/bootscripts/ChangeLog
===================================================================
--- trunk/bootscripts/ChangeLog	2005-01-02 07:08:23 UTC (rev 3169)
+++ trunk/bootscripts/ChangeLog	2005-01-02 10:49:04 UTC (rev 3170)
@@ -1,3 +1,6 @@
+2005-01-02 DJ Lucas <dj at linuxfromscratch.org>
+	* Added courier bootscript.
+
 2004-12-27 Randy McMurchy <randy at linuxfromscratch.org>
 	* Changed Exim bootscript to start the daemon with -q15m instead
 	  of -q1m.

Modified: trunk/bootscripts/Makefile
===================================================================
--- trunk/bootscripts/Makefile	2005-01-02 07:08:23 UTC (rev 3169)
+++ trunk/bootscripts/Makefile	2005-01-02 10:49:04 UTC (rev 3170)
@@ -64,6 +64,16 @@
 	ln -sf  ../init.d/bind ${EXTDIR}/rc.d/rc5.d/S22bind
 	ln -sf  ../init.d/bind ${EXTDIR}/rc.d/rc6.d/K49bind
 
+install-courier: create-dirs
+	install -m ${MODE} blfs/init.d/courier    ${EXTDIR}/rc.d/init.d/
+	ln -sf ../init.d/courier ${EXTDIR}/rc.d/rc0.d/K25courier
+	ln -sf ../init.d/courier ${EXTDIR}/rc.d/rc1.d/K25courier
+	ln -sf ../init.d/courier ${EXTDIR}/rc.d/rc2.d/K25courier
+	ln -sf ../init.d/courier ${EXTDIR}/rc.d/rc3.d/S35courier
+	ln -sf ../init.d/courier ${EXTDIR}/rc.d/rc4.d/S35courier
+	ln -sf ../init.d/courier ${EXTDIR}/rc.d/rc5.d/S35courier
+	ln -sf ../init.d/courier ${EXTDIR}/rc.d/rc6.d/K25courier
+
 install-cups: create-dirs
 	install -m ${MODE} blfs/init.d/cups       ${EXTDIR}/rc.d/init.d/
 	ln -sf  ../init.d/cups ${EXTDIR}/rc.d/rc0.d/K00cups
@@ -420,6 +430,7 @@
 	install-alsa \
 	install-apache \
 	install-bind \
+	install-courier \
 	install-cups \
 	install-cyrus-sasl \
 	install-dhcp \

Added: trunk/bootscripts/blfs/init.d/courier
===================================================================
--- trunk/bootscripts/blfs/init.d/courier	2005-01-02 07:08:23 UTC (rev 3169)
+++ trunk/bootscripts/blfs/init.d/courier	2005-01-02 10:49:04 UTC (rev 3170)
@@ -0,0 +1,235 @@
+#!/bin/sh
+# Begin $rc_base/init.d/courier
+
+# Based on sysklogd script from LFS-3.1 and earlier.
+# Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
+
+# $LastChangedBy$
+# $Date$
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+	start)
+		# Start daemons.
+		touch /var/lock/subsys/courier
+		echo "Starting Courier mail services:"
+
+		# Start courierfilter
+		echo "     Courierfilter..."
+		/usr/sbin/courierfilter start
+		evaluate_retval		
+
+		# Start authdaemond
+		echo "     Auth..."
+		/usr/lib/courier/authlib/authdaemond start
+		evaluate_retval
+
+		# Start ldapaliasd
+		if [ -f /etc/courier/ldapaliasd ]; then
+			. /etc/courier/ldapaliasd
+			if [ "${LDAPALIASDSTART}" == "YES" ]; then
+				echo "     LDAP Alias..."
+				/usr/sbin/courierldapaliasd start
+				if [ "${?}" -eq "0" ]; then
+					echo_ok
+					touch /var/run/courier/ldapaliasd.lock
+				else
+					echo_failed
+				fi
+			fi
+		fi
+
+		# Start Webmail
+		if [ -f /etc/courier/webmaild ]; then
+			. /etc/courier/webmaild
+			if [ "${WEBMAILDSTART}" == "YES" ]; then
+				echo "     Webmail..."
+				/usr/sbin/webmaild start
+				evaluate_retval
+			fi
+		fi
+
+		# Start Courierd
+		echo "     Courier..."
+		/usr/sbin/courier start
+		evaluate_retval
+
+		# Start ESMTPD
+		if [ -f /etc/courier/esmtpd ]; then
+			. /etc/courier/esmtpd
+			if [ "${ESMTPDSTART}" == "YES" ]; then
+				echo "     ESMTP..."
+				/usr/sbin/esmtpd start
+				evaluate_retval
+			fi
+		fi
+
+		# Start ESMTPD-SSL
+		if [ -f /etc/courier/esmtpd-msa ]; then
+			. /etc/courier/esmtpd-msa
+			if [ "${ESMTPDSTART}" == "YES" ]; then
+				echo "     ESMTP-MSA..."
+				/usr/sbin/esmtpd-msa start
+				evaluate_retval
+			fi
+		fi
+
+		if [ -f /etc/courier/esmtpd-ssl ]; then
+			. /etc/courier/esmtpd-ssl
+			if [ "${ESMTPDSSLSTART}" == "YES" ]; then
+				echo "     ESMTP-SSL..."
+				/usr/sbin/esmtpd-ssl start
+				evaluate_retval
+			fi
+		fi
+
+		# Start POP3D
+		if [ -f /etc/courier/pop3d ]; then
+			. /etc/courier/pop3d
+			if [ "${POP3DSTART}" == "YES" ]; then
+				echo "     POP3..."
+				/usr/sbin/pop3d start
+				evaluate_retval
+			fi
+		fi
+
+		# Start POP3D-SSL
+		if [ -f /etc/courier/pop3d-ssl ]; then
+			. /etc/courier/pop3d-ssl
+			if [ "${POP3DSSLSTART}" == "YES" ]; then
+				echo "     POP3-SSL..."
+				/usr/sbin/pop3d-ssl start
+				evaluate_retval
+			fi
+		fi
+
+		# Start IMAPD
+		if [ -f /etc/courier/imapd ]; then
+			. /etc/courier/imapd
+			if [ "${IMAPDSTART}" == "YES" ]; then
+				echo "     IMAP..."
+				/usr/sbin/imapd start
+				evaluate_retval
+			fi
+		fi
+
+		# Start IMAPD-SSL
+		if [ -f /etc/courier/imapd-ssl ]; then
+			. /etc/courier/imapd-ssl
+			if [ "${IMAPDSSLSTART}" == "YES" ]; then
+				echo "     IMAP-SSL..."
+				/usr/sbin/imapd-ssl start
+				evaluate_retval
+			fi
+		fi
+        ;;
+
+
+	stop)
+		echo "Stopping Courier mail services:"
+
+		# IMAP SSL
+		if [ -f /var/run/courier/imapd-ssl.pid.lock ]; then
+			echo "     IMAP SSL..."
+			/usr/sbin/imapd-ssl stop
+			evaluate_retval
+			rm -f /var/run/courier/imapd-ssl.pid{,.lock}
+		fi
+
+		# IMAP
+		if [ -f /var/run/courier/imapd.pid.lock ]; then
+			echo "     IMAP..."
+			/usr/sbin/imapd stop
+			evaluate_retval
+			rm -f /var/run/courier/imapd.pid{,.lock}
+		fi
+
+		# POP3 SSL
+		if [ -f /var/run/courier/pop3d-ssl.pid.lock ]; then
+			echo "     POP3 SSL..."
+			/usr/sbin/pop3d-ssl stop
+			evaluate_retval
+			rm -f /var/run/courier/pop3d-ssl.pid{,.lock}
+		fi
+
+		# POP3
+		if [ -f /var/run/courier/pop3d.pid.lock ]; then
+			echo "     POP3..."
+			/usr/sbin/pop3d stop
+			evaluate_retval
+			rm /var/run/courier/pop3d.pid{,.lock}
+		fi
+
+		# ESMTP SSL
+		if [ -f /var/run/courier/esmtpd-ssl.pid.lock ]; then
+			echo "     ESMTP SSL..."
+			/usr/sbin/esmtpd-ssl stop
+			evaluate_retval
+			rm -f /var/run/courier/esmtpd-ssl.pid{,.lock}
+		fi
+
+		# ESMTP MSA
+		if [ -f /var/run/courier/esmtpd-msa.pid.lock ]; then
+			echo "     ESMTP MSA..."
+			/usr/sbin/esmtpd-msa stop
+			evaluate_retval
+			rm -f /var/run/courier/esmtpd-msa.pid{,.lock}
+		fi
+
+		# ESMTP
+		if [ -f /var/run/courier/esmtpd.pid.lock ]; then
+			echo "     ESMTP..."
+			/usr/sbin/esmtpd stop
+			evaluate_retval
+			rm -f /var/run/courier/esmtpd.pid{,.lock}
+		fi
+
+		# Courier
+		echo "     Courier..."
+		/usr/sbin/courier stop
+		evaluate_retval
+
+		# LDAP Alias
+		if [ -f /var/run/courier/ldapaliasd.lock ]; then
+			echo "     LDAP Alias..."
+			/usr/sbin/ldapaliasd stop
+			evaluate_retval
+			rm -f /var/run/courier/ldapaliasd.lock
+		fi
+
+		# Authdaemon
+		echo "     Auth..."
+		/usr/lib/courier/authlib/authdaemond stop
+		evaluate_retval
+
+		# Courierfilter
+		if [ -f /var/run/courier/courierfilter.pid ]; then
+			echo "     Courierfilter..."
+			/usr/sbin/courierfilter stop
+			evaluate_retval
+			rm -f /var/run/courier/courierfilter.pid
+		fi
+
+		# Remove the master lock file
+		rm -f /var/lock/subsys/courier
+	;;
+
+	restart)
+		$0 stop
+		sleep 1
+		$0 start
+        ;;
+
+	status)
+		statusproc courierfilter
+	;;
+
+	*)
+		echo "Usage: $0 {start|stop|restart|status}"
+		exit 1
+	;;
+esac
+
+# End $rc_base/init.d/courier


Property changes on: trunk/bootscripts/blfs/init.d/courier
___________________________________________________________________
Name: svn:keywords
   + LastChangedBy Date




More information about the blfs-book mailing list