[packages/apache/feat/restart-delay-parameter] add RESTART_DELAY parameter to sleep between stop and start

glen glen at pld-linux.org
Tue Oct 7 15:16:05 CEST 2014


commit 00ab488f59c5aacbcab9708a1c70b142520264d2
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Oct 7 16:15:50 2014 +0300

    add RESTART_DELAY parameter to sleep between stop and start

 apache.init      | 2 ++
 apache.sysconfig | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/apache.init b/apache.init
old mode 100644
new mode 100755
index 8ce5a86..00dd2f4
--- a/apache.init
+++ b/apache.init
@@ -127,6 +127,7 @@ condrestart() {
 
 	checkconfig
 	stop
+	[ "$RESTART_DELAY" ] && usleep $RESTART_DELAY
 	start
 }
 
@@ -142,6 +143,7 @@ case "$1" in
   restart)
 	checkconfig
 	stop
+	[ "$RESTART_DELAY" ] && usleep $RESTART_DELAY
 	start 0
 	;;
   try-restart)
diff --git a/apache.sysconfig b/apache.sysconfig
index c76349c..bc192b8 100644
--- a/apache.sysconfig
+++ b/apache.sysconfig
@@ -1,5 +1,4 @@
 # Customized settings for Apache
-# $Id$
 
 # Nice level for apache
 SERVICE_RUN_NICE_LEVEL="+5"
@@ -16,3 +15,6 @@ HTTPD_OPTS=""
 
 # Skip apache restarts invoked from rpm installs.
 #RPM_SKIP_AUTO_RESTART=yes
+
+# Delay in microseconds between stop and start to mitigate problems of third party Apache modules (PHP session ext
+#RESTART_DELAY=50000
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache.git/commitdiff/00ab488f59c5aacbcab9708a1c70b142520264d2



More information about the pld-cvs-commit mailing list