OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Peter Smej Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 26-Mar-2003 16:38:38 Branch: HEAD Handle: 2003032615383700 Modified files: openpkg-src/bs bs.spec bsapache.conf bsapachectl rc.bs Log: Appending apache configs Summary: Revision Changes Path 1.2 +42 -3 openpkg-src/bs/bs.spec 1.2 +14 -14 openpkg-src/bs/bsapache.conf 1.2 +2 -2 openpkg-src/bs/bsapachectl 1.2 +15 -0 openpkg-src/bs/rc.bs ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/bs/bs.spec ============================================================================ $ cvs diff -u -r1.1 -r1.2 bs.spec --- openpkg-src/bs/bs.spec 26 Mar 2003 13:20:12 -0000 1.1 +++ openpkg-src/bs/bs.spec 26 Mar 2003 15:38:37 -0000 1.2 @@ -34,7 +34,7 @@ URL: http://bigsister.graeff.com/ Vendor: Thomas Aeby Packager: The OpenPKG Project -Distribution: OpenPKG [JUNK] +Distribution: OpenPKG [EVAL] Group: Network License: GNU Version: %{V_version}%{V_patch} @@ -42,6 +42,9 @@ # list of sources Source0: http://easynews.dl.sorceforge.net/sourceforge/bigsister/big-sister-%{version}.tar.gz +Source1: rc.bs +Source2: bsapache.conf +Source3: bsapachectl # build information Prefix: %{l_prefix} @@ -84,7 +87,7 @@ %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/share/bs/cgi \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ - $RPM_BUILD_ROOT%{l_prefix}/var/bs/ \ + $RPM_BUILD_ROOT%{l_prefix}/var/bs \ $RPM_BUILD_ROOT%{l_prefix}/libexec/bs/www/skins \ $RPM_BUILD_ROOT%{l_prefix}/libexec/bs/www/skins/alt_contentsicons \ $RPM_BUILD_ROOT%{l_prefix}/libexec/bs/www/skins/bigbro13 \ @@ -134,7 +137,7 @@ make install \ DEST=$RPM_BUILD_ROOT%{l_prefix}/libexec/bs \ PERL=%{l_prefix}/bin/perl \ - CGIPATH=%{l_prefix}/share/bs/cgi \ + CGIPATH=/bs-cgi \ WEBROOT=%{prefix}/share/bs \ EXEC=%{l_prefix}/libexec/bs @@ -155,11 +158,47 @@ -e 's;@l_bsdir@;%{l_prefix}/libexec/bs;g' \ %{SOURCE rc.bs} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ + # install apache environment + + # apachectl wrapper + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/bs/tools + %{l_shtool} install -c -m 755 \ + -e 's;@l_prefix@;%{l_prefix};g' \ + %{SOURCE bsapachectl} \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/bs/tools/ + + # apache config + l_hostname=`%{l_shtool} echo -e %h` + l_domainname=`%{l_shtool} echo -e %d | cut -c2-` + %{l_shtool} install -c -m 755 \ + -e 's;@l_prefix@;%{l_prefix};g' \ + -e 's;@l_rusr@;%{l_rusr};g' \ + -e 's;@l_rgrp@;%{l_rgrp};g' \ + -e 's;@l_hostname@;${l_hostname};g' \ + -e 's;@l_domainame@;${l_domainname};g' \ + %{SOURCE bsapache.conf} \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/bs/etc + + # apache data + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/var/bs/run + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/var/bs/log + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \ '%attr(0755,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bs' %files -f files + %clean rm -rf $RPM_BUILD_ROOT + +%preun + if [ $1 -eq 0 ]; then + $RPM_INSTALL_PREFIX/etc/rc bs stop + rm -f $RPM_INSTALL_PREFIX/var/bs/log/* + rm -f $RPM_INSTALL_PREFIX/var/bs/run/* + fi @@ . patch -p0 <<'@@ .' Index: openpkg-src/bs/bsapache.conf ============================================================================ $ cvs diff -u -r1.1 -r1.2 bsapache.conf --- openpkg-src/bs/bsapache.conf 26 Mar 2003 13:20:12 -0000 1.1 +++ openpkg-src/bs/bsapache.conf 26 Mar 2003 15:38:37 -0000 1.2 @@ -1,6 +1,6 @@ ## -## rtapache.conf -- RT Apache Custom Configuration -## ______________________________________________________ +## bsapache.conf -- big sister Apache Custom Configuration +## _______________________________________________________ ## ServerType standalone @@ -10,11 +10,11 @@ ServerTokens Prod User @l_rusr@ Group @l_rgrp@ -Port 8380 +Port 8381 # runtime files -PidFile @l_prefix@/var/rt/run/apache.pid -ScoreBoardFile @l_prefix@/var/rt/run/apache.sb +PidFile @l_prefix@/var/bs/run/apache.pid +ScoreBoardFile @l_prefix@/var/bs/run/apache.sb # server behaviour Timeout 300 @@ -88,7 +88,7 @@ <IfModule mod_alias.c> ScriptAlias /bs-cgi "@l_prefix@/libexec/bs/bin" - <Directory "/cw/cgi"> + <Directory "@l_prefix@/libexec/bs/bin"> AllowOverride None Options None Order allow,deny @@ -96,11 +96,11 @@ </Directory> </IfModule> -<IfModule mod_perl.c> -PerlModule Apache::DBI -PerlRequire @l_prefix@/cgi/rt/webmux.pl -<Location /> - SetHandler perl-script - PerlHandler RT::Mason -</Location> -</IfModule> +#<IfModule mod_perl.c> +#PerlModule Apache::DBI +#PerlRequire @l_prefix@/cgi/rt/webmux.pl +#<Location /> +# SetHandler perl-script +# PerlHandler RT::Mason +#</Location> +#</IfModule> @@ . patch -p0 <<'@@ .' Index: openpkg-src/bs/bsapachectl ============================================================================ $ cvs diff -u -r1.1 -r1.2 bsapachectl --- openpkg-src/bs/bsapachectl 26 Mar 2003 13:20:13 -0000 1.1 +++ openpkg-src/bs/bsapachectl 26 Mar 2003 15:38:37 -0000 1.2 @@ -1,7 +1,7 @@ #!/bin/sh sed \ - -e "s;^\(PIDFILE=\).*;[EMAIL PROTECTED]@/var/bs/apache.pid;" \ - -e "s;^\(HTTPD=\)\(.*\);\1\"\2 -f @l_prefix@/libexec/etc/bsapache.conf\";" \ + -e "s;^\(PIDFILE=\).*;[EMAIL PROTECTED]@/var/bs/run/apache.pid;" \ + -e "s;^\(HTTPD=\)\(.*\);\1\"\2 -f @l_prefix@/libexec/bs/etc/bsapache.conf\";" \ @l_prefix@/sbin/apachectl \ | sh -s "$@" @@ . patch -p0 <<'@@ .' Index: openpkg-src/bs/rc.bs ============================================================================ $ cvs diff -u -r1.1 -r1.2 rc.bs --- openpkg-src/bs/rc.bs 26 Mar 2003 13:20:13 -0000 1.1 +++ openpkg-src/bs/rc.bs 26 Mar 2003 15:38:37 -0000 1.2 @@ -5,6 +5,7 @@ %config bs_enable="yes" + [EMAIL PROTECTED]@/libexec/bs/tools/bsapachectl %start -p 200 -u @l_rusr@ opServiceEnabled bs || exit 0 @@ -31,6 +32,7 @@ (ps -e 2>/dev/null)) \ |grep "bsmon"|grep -v "PID"|grep "perl"|awk '{printf("%d ",$1)}' \ > @l_prefix@/var/bs/bs.pid + ${bs_apachectl} start %stop -p 200 -u @l_rusr@ opServiceEnabled bs || exit 0 @@ -46,6 +48,11 @@ kill -TERM `cat @l_prefix@/var/bs/uxmon.pid` rm @l_prefix@/var/bs/uxmon.pid fi + if [ -f @l_prefix@/var/bs/run/apache.pid ]; then + ${bs_apachectl} stop + rm @l_prefix@/var/bs/run/apache.pid + fi + %restart -u @l_rusr@ opServiceEnabled bs || exit 0 @@ -68,6 +75,7 @@ @l_prefix@/bin/perl @l_bsdir@/bin/bsmon -f @l_bsdir@/etc/bsmon.cfg fi + ${bs_apachectl} stop if [ -f @l_bsdir@/bin/bbd -a -f @l_bsdir@/adm/bb-display.cfg ]; then @l_prefix@/bin/perl @l_bsdir@/bin/bbd -b @l_bsdir@ fi @@ -85,13 +93,20 @@ fi ps ax 2>/dev/null| grep -w "bs" 2>/dev/null|grep -v "PID"| grep "perl" | awk '{printf("%d ",$1)}' \ > @l_prefix@/var/bs/bs.pid + ${bs_apachectl} start %reload -u @l_rusr@ opServiceEnabled bs || exit 0 + if [ -f @l_prefix@/var/bs/bs.pid ]; then + kill -HUP `cat @l_prefix@/var/bs/bs.pid` + fi if [ -f @l_prefix@/var/bs/bbd.pid ]; then kill -HUP `cat @l_prefix@/var/bs/bbd.pid` fi if [ -f @l_prefix@/var/bs/uxmon.pid ]; then kill -HUP `cat @l_prefix@/var/bs/uxmon.pid` + fi + if [ [EMAIL PROTECTED]@/var/bs/apache.pid ]; then + kill -HUP `cat @l_prefix@/var/bs/run/apache.pid` fi @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]