Michael van Elst 23 years ago
parent
commit
a45c0d7cea
2 changed files with 14 additions and 3 deletions
  1. 3 3
      apache/apache.spec
  2. 11 0
      apache/rc.apache

+ 3 - 3
apache/apache.spec

@@ -60,7 +60,7 @@ Distribution: OpenPKG [BASE]
 Group:        Web
 License:      ASF
 Version:      %{V_apache}
-Release:      20030715
+Release:      20030717
 
 #   package options (suexec related)
 %option       with_suexec               yes
@@ -196,8 +196,8 @@ Patch1:       php.patch
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20030710
-PreReq:       OpenPKG, openpkg >= 20030710
+BuildPreReq:  OpenPKG, openpkg >= 20030716
+PreReq:       OpenPKG, openpkg >= 20030716
 %if "%{with_mod_ssl}" == "yes"
 BuildPreReq:  openssl, mm
 PreReq:       openssl, mm

+ 11 - 0
apache/rc.apache

@@ -18,6 +18,17 @@
     apache_err_rotprolog="true"
     apache_err_rotepilog="true"
 
+%status -p 200 -u @l_susr@ -o
+    apache_usable="no"
+    apache_active="no"
+    @l_prefix@/sbin/apachectl configtest 2>/dev/null && apache_usable="yes"
+    ( eval `grep "^PIDFILE=" @l_prefix@/sbin/apachectl`
+      [ ".$PIDFILE" != . -a -f "$PIDFILE" ] && kill -0 `cat $PIDFILE`
+    ) && apache_active="yes"
+    echo "apache_enable=\"$apache_enable\""
+    echo "apache_usable=\"$apache_usable\""
+    echo "apache_active=\"$apache_active\""
+
 %start -p 200 -u @l_susr@
     opServiceEnabled apache || exit 0
     @l_prefix@/sbin/apachectl start