OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 22-Jul-2003 14:54:35 Branch: HEAD Handle: 2003072213543400 Modified files: openpkg-src/apache apache.conf apache.spec rc.apache Log: PR#202 run-time check and related issues Summary: Revision Changes Path 1.3 +1 -0 openpkg-src/apache/apache.conf 1.157 +12 -3 openpkg-src/apache/apache.spec 1.15 +25 -18 openpkg-src/apache/rc.apache ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/apache/apache.conf ============================================================================ $ cvs diff -u -r1.2 -r1.3 apache.conf --- openpkg-src/apache/apache.conf 14 Feb 2003 16:00:08 -0000 1.2 +++ openpkg-src/apache/apache.conf 22 Jul 2003 12:54:34 -0000 1.3 @@ -12,4 +12,5 @@ # override/extend with local configuration #Include "@l_prefix@/etc/apache/apache.vhost" +Listen 127.0.0.1:80 @@ . patch -p0 <<'@@ .' Index: openpkg-src/apache/apache.spec ============================================================================ $ cvs diff -u -r1.156 -r1.157 apache.spec --- openpkg-src/apache/apache.spec 22 Jul 2003 08:10:38 -0000 1.156 +++ openpkg-src/apache/apache.spec 22 Jul 2003 12:54:34 -0000 1.157 @@ -945,11 +945,20 @@ fi %endif + # after upgrade, restart service + [ $1 -eq 2 ] || exit 0 + eval `%{l_rc} apache status 2>/dev/null` + [ ".$apache_active" = .yes ] && %{l_rc} apache restart + exit 0 + %preun + # before erase, stop service and remove log files + [ $1 -eq 0 ] || exit 0 + %{l_rc} apache stop 2>/dev/null + rm -rf $RPM_INSTALL_PREFIX/var/apache/log/ >/dev/null 2>&1 || true %if "%{with_mod_auth_pam}" == "yes" # remove PAM configuration entry - if [ $1 -eq 0 ]; then - $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=apache - fi + $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=apache %endif + exit 0 @@ . patch -p0 <<'@@ .' Index: openpkg-src/apache/rc.apache ============================================================================ $ cvs diff -u -r1.14 -r1.15 rc.apache --- openpkg-src/apache/rc.apache 22 Jul 2003 08:10:38 -0000 1.14 +++ openpkg-src/apache/rc.apache 22 Jul 2003 12:54:34 -0000 1.15 @@ -6,17 +6,17 @@ %config apache_enable="$openpkg_rc_def" apache_log_files="@l_prefix@/var/apache/log/access.log" - apache_log_rotsteps="10" - apache_log_rotminsize="10M" - apache_log_rotcomplevel="9" - apache_log_rotprolog="true" - apache_log_rotepilog="true" + apache_log_prolog="true" + apache_log_epilog="true" + apache_log_numfiles="10" + apache_log_minsize="1M" + apache_log_complevel="9" apache_err_files="@l_prefix@/var/apache/log/error.log" - apache_err_rotsteps="10" - apache_err_rotminsize="1M" - apache_err_rotcomplevel="9" - apache_err_rotprolog="true" - apache_err_rotepilog="true" + apache_err_prolog="true" + apache_err_epilog="true" + apache_err_numfiles="10" + apache_err_minsize="1M" + apache_err_complevel="9" %status -u @l_susr@ -o apache_usable="no" @@ -31,33 +31,40 @@ %start -u @l_susr@ rcService apache enable yes || exit 0 + rcService apache active yes && exit 0 @l_prefix@/sbin/apachectl start %stop -u @l_susr@ rcService apache enable yes || exit 0 + rcService apache active no && exit 0 @l_prefix@/sbin/apachectl stop sleep 2 %restart -u @l_susr@ rcService apache enable yes || exit 0 + rcService apache active no && exit 0 @l_prefix@/sbin/apachectl restart %daily -u @l_susr@ rcService apache enable yes || exit 0 + if [ ".$apache_log_files" != . ]; then + # rotate logfile shtool rotate -f \ - -n ${apache_log_rotsteps} -s ${apache_log_rotminsize} -d \ - -z ${apache_log_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \ - -P "$apache_log_rotprolog" \ - -E "@l_prefix@/sbin/apachectl restart; $apache_log_rotepilog" \ + -n ${apache_log_numfiles} -s ${apache_log_minsize} -d \ + -z ${apache_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ + -P "${apache_log_prolog}" \ + -E "${apache_log_epilog} && rc apache restart" \ $apache_log_files fi + if [ ".$apache_err_files" != . ]; then + # rotate errfile shtool rotate -f \ - -n ${apache_err_rotsteps} -s ${apache_err_rotminsize} -d \ - -z ${apache_err_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \ - -P "$apache_err_rotprolog" \ - -E "@l_prefix@/sbin/apachectl restart; $apache_err_rotepilog" \ + -n ${apache_err_numfiles} -s ${apache_err_minsize} -d \ + -z ${apache_err_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ + -P "${apache_err_prolog}" \ + -E "${apache_err_epilog} && rc apache restart" \ $apache_err_files fi @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]