From 1f79aa477e11e12d6a7851de5052293dde15c11d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 30 Aug 2006 14:47:21 +0000 Subject: [PATCH] - add flush-logs target Changed files: apache.init -> 1.55 apache.logrotate -> 1.13 --- apache.init | 15 +++++++++++++++ apache.logrotate | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/apache.init b/apache.init index 64e6cad..c74b3fc 100644 --- a/apache.init +++ b/apache.init @@ -86,6 +86,21 @@ case "$1" in 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 diff --git a/apache.logrotate b/apache.logrotate index 9712044..52d6f95 100644 --- a/apache.logrotate +++ b/apache.logrotate @@ -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 } -- 2.44.0