SOURCES: apache.init, apache.logrotate - add flush-logs target

glen glen at pld-linux.org
Wed Aug 30 16:47:26 CEST 2006


Author: glen                         Date: Wed Aug 30 14:47:26 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add flush-logs target

---- Files affected:
SOURCES:
   apache.init (1.54 -> 1.55) , apache.logrotate (1.12 -> 1.13) 

---- Diffs:

================================================================
Index: SOURCES/apache.init
diff -u SOURCES/apache.init:1.54 SOURCES/apache.init:1.55
--- SOURCES/apache.init:1.54	Tue May 30 13:40:40 2006
+++ SOURCES/apache.init	Wed Aug 30 16:47:21 2006
@@ -86,6 +86,21 @@
 		RETVAL=7
 	fi
 	;;
+  flush-logs)
+	if [ -f /var/lock/subsys/httpd ]; then
+		msg_reloading httpd.${HTTPD_MPM}
+
+		httpd.${HTTPD_MPM} -t >/dev/null 2>&1
+		RETVAL=$?
+		if [ $RETVAL -eq 0 ]; then
+			daemon httpd.${HTTPD_MPM} $CFG -k graceful
+			RETVAL=$?
+		else
+			fail
+			echo >&2 "Configuration file syntax test failed."
+		fi
+	fi
+	;;
   force-reload)
 	if [ -f /var/lock/subsys/httpd ]; then
 		run_cmd "Checking httpd.${HTTPD_MPM} configuration" httpd.${HTTPD_MPM} $CFG -t

================================================================
Index: SOURCES/apache.logrotate
diff -u SOURCES/apache.logrotate:1.12 SOURCES/apache.logrotate:1.13
--- SOURCES/apache.logrotate:1.12	Wed Jul 19 09:47:35 2006
+++ SOURCES/apache.logrotate	Wed Aug 30 16:47:21 2006
@@ -9,6 +9,6 @@
     olddir /var/log/archiv/httpd
     sharedscripts
     postrotate
-		/etc/rc.d/init.d/httpd graceful > /dev/null 2>&1 || /bin/true
+		/etc/rc.d/init.d/httpd flush-logs > /dev/null
     endscript
 }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/apache.init?r1=1.54&r2=1.55&f=u
    http://cvs.pld-linux.org/SOURCES/apache.logrotate?r1=1.12&r2=1.13&f=u



More information about the pld-cvs-commit mailing list