[arch-commits] Commit in apache/trunk (PKGBUILD httpd)

Andrea Scarpino andrea at archlinux.org
Sat Nov 7 12:17:38 UTC 2009


    Date: Saturday, November 7, 2009 @ 07:17:38
  Author: andrea
Revision: 58370

rewritten rc.d script, the previous restart gave DONE with a wrong http.conf (FS#16994)

Modified:
  apache/trunk/PKGBUILD
  apache/trunk/httpd

----------+
 PKGBUILD |    4 ++--
 httpd    |   51 ++++++++++++++++++++++-----------------------------
 2 files changed, 24 insertions(+), 31 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-11-07 11:16:42 UTC (rev 58369)
+++ PKGBUILD	2009-11-07 12:17:38 UTC (rev 58370)
@@ -4,7 +4,7 @@
 
 pkgname=apache
 pkgver=2.2.14
-pkgrel=1
+pkgrel=2
 pkgdesc='A high performance Unix-based HTTP server'
 arch=('i686' 'x86_64')
 options=('!libtool')
@@ -21,7 +21,7 @@
         'httpd.logrotate' 'httpd' 'arch.layout')
 md5sums=('a5226203aaf97e5b941c41a71c112704'
          'f4d627c64024c1b7b95efb5ffbaa625e'
-         'bddd84dafa770d74df1dc1f96bd71823'
+         'a2f8d78b622384783fca8388931397fa'
          '3d659d41276ba3bfcb20c231eb254e0c')
 
 build() {

Modified: httpd
===================================================================
--- httpd	2009-11-07 11:16:42 UTC (rev 58369)
+++ httpd	2009-11-07 12:17:38 UTC (rev 58370)
@@ -5,62 +5,55 @@
 . /etc/rc.conf
 . /etc/rc.d/functions
 
+APACHECTL=/usr/sbin/apachectl
 
 case "$1" in
   start)
-    stat_busy "Starting Apache Web Server"
-    # RUN
-    /usr/sbin/apachectl start &>/dev/null
-    #
-    if [ $? -gt 0 ]; then
-      stat_fail
-      exit 1
-    else
+    stat_busy "Starting $daemon_name daemon"
+    if $APACHECTL start &>/dev/null ; then
       add_daemon $daemon_name
       stat_done
+    else
+      stat_fail
+      exit 1
     fi
     ;;
 
   stop)
-    stat_busy "Stopping Apache Web Server"
-    # KILL
-    /usr/sbin/apachectl stop &>/dev/null
-    #
-    if [ $? -gt 0 ]; then
-      stat_fail
-      exit 1
-    else
+    stat_busy "Stopping $daemon_name daemon"
+    if $APACHECTL stop &>/dev/null ; then
       rm_daemon $daemon_name
       stat_done
+    else
+      stat_fail
+      exit 1
     fi
     ;;
 
   reload)
-    stat_busy "Reloading Apache Web Server"
-    /usr/sbin/apachectl graceful &>/dev/null
-    if [ $? -gt 0 ]; then
-      stat_fail
-      exit 1
-    else
+    stat_busy "Reloading $daemon_name daemon"
+    if $APACHECTL graceful &>/dev/null ; then
       add_daemon $daemon_name
       stat_done
+    else
+      stat_fail
+      exit 1
     fi
     ;;
 
   restart)
-    stat_busy "Restarting Apache Web Server"
-    /usr/sbin/apachectl restart &>/dev/null
-    if [ $? -gt 0 ]; then
-      stat_fail
-      exit 1
-    else
+    stat_busy "Restarting $daemon_name daemon"
+    if $APACHECTL restart &>/dev/null ; then
       add_daemon $daemon_name
       stat_done
+    else
+      stat_fail
+      exit 1
     fi
     ;;
 
   status)
-    stat_busy "Checking Apache Web Server status";
+    stat_busy "Checking $daemon_name status";
     ck_status $daemon_name
     ;;
 




More information about the arch-commits mailing list