SOURCES: spamassassin-spamd-apache2.init - cleaned up and pldized

glen glen at pld-linux.org
Wed Jun 13 22:57:15 CEST 2007


Author: glen                         Date: Wed Jun 13 20:57:15 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- cleaned up and pldized

---- Files affected:
SOURCES:
   spamassassin-spamd-apache2.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/spamassassin-spamd-apache2.init
diff -u SOURCES/spamassassin-spamd-apache2.init:1.1 SOURCES/spamassassin-spamd-apache2.init:1.2
--- SOURCES/spamassassin-spamd-apache2.init:1.1	Tue Mar 27 15:35:52 2007
+++ SOURCES/spamassassin-spamd-apache2.init	Wed Jun 13 22:57:10 2007
@@ -37,19 +37,12 @@
 	if [ ! -f /var/lock/subsys/spamd-apache2 ]; then
 		msg_starting spamd-apache2
 		if [ -n "$SA2_CONFIG" ]; then
-			$SA2_MPM -f $SA2_CONFIG -d / -k start
+			daemon $SA2_MPM -f $SA2_CONFIG -d / -k start
 		else
-			apache-spamd.pl -k start --httpd-path $SA2_MPM --pidfile $SA2_PID $SA2_OPTS
+			daemon apache-spamd.pl -k start --httpd-path $SA2_MPM --pidfile $SA2_PID $SA2_OPTS
 		fi
 		RETVAL=$?
-		if [ $RETVAL -eq 0 ]; then
-			touch /var/lock/subsys/spamd-apache2
-			log_success "$1 startup"
-			ok
-		else
-			fail
-			log_failed "$1 startup"
-		fi
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/spamd-apache2
 	else
 		msg_already_running spamd-apache2
 	fi
@@ -64,32 +57,12 @@
 		else
 			apache-spamd.pl -k stop  --httpd-path $SA2_MPM --pidfile $SA2_PID $SA2_OPTS
 		fi
-		#killproc spamd-apache2
-		if [ $RETVAL -eq 0 ]; then
-			touch /var/lock/subsys/spamd-apache2
-			log_success "$1 startup"
-			ok
-		else
-			fail
-			log_failed "$1 startup"
-		fi
 		rm -f /var/lock/subsys/spamd-apache2
 	else
 		msg_not_running spamd-apache2
 	fi
 }
 
-#reload() {
-#	if [ -f /var/lock/subsys/spamd-apache2 ]; then
-#		msg_reloading spamd-apache2
-#		killproc spamd-apache2 -HUP
-#		RETVAL=$?
-#	else
-#		msg_not_running spamd-apache2
-#		RETVAL=7
-#	fi
-#}
-
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -102,19 +75,7 @@
   restart)
 	stop
 	start
-	exit $?
 	;;
-#  reload)
-#  	reload
-#	;;
-#  force-reload)
-#	# if program allows reloading without stopping
-#	reload
-#
-#	# or if it doesn't
-#	stop
-#	start
-#	;;
   status)
 	status spamd-apache2
 	RETVAL=$?
@@ -125,5 +86,3 @@
 esac
 
 exit $RETVAL
-
-# vi:syntax=sh
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/spamassassin-spamd-apache2.init?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list