From 749f3e348f2e0d2250f86ebff8dfbda5a645a344 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 14 Jun 2011 15:52:46 +0200 Subject: [PATCH] mod_fcgid benutzen --- DEBIAN/DEBIAN/control | 4 ++-- DEBIAN/DEBIAN/postinst | 43 ++++++++++++++++++++++++++++++++++------- DEBIAN/mk_erp_deb.sh | 7 +++---- DEBIAN/struktur.tgz | Bin 2762 -> 2828 bytes 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/DEBIAN/DEBIAN/control b/DEBIAN/DEBIAN/control index 15f724c69..a7028e2cc 100644 --- a/DEBIAN/DEBIAN/control +++ b/DEBIAN/DEBIAN/control @@ -5,8 +5,8 @@ Section: universe/web Priority: optional Installed-Size: 0 Maintainer: Holger Lindemann , Adrian Weibel -Depends: patch, apache2 | lighttpd, postgresql-8.3 | postgresql-8.4, libdbi-perl, libdbd-pg-perl, libpg-perl, libarchive-zip-perl, libyaml-perl, libio-stringy-perl, libtemplate-perl, libpdf-api2-perl, libcgi-ajax-perl, liblist-moreutils-perl, libxml-writer-perl, libtext-csv-xs-perl | libtext-csv-perl, liburi-perl, libdatetime-perl, libtext-iconv-perl, libclass-accessor-perl, libemail-address-perl, libparent-perl, librose-object-perl, librose-db-perl, librose-db-object-perl, libsort-naturally-perl | perl, libparams-validate-perl, libfcgi-perl, libconfig-std-perl -Suggests: tetex-base | texlive-latex-base, tetex-bin | texlive-base-bin , tetex-extra | texlive-latex-extra, xpdf | evince | okular, libapache2-mod-fastcgi +Depends: patch, apache2 | lighttpd, libapache2-mod-fcgid | lighttpd, postgresql-8.3 | postgresql-8.4, libdbi-perl, libdbd-pg-perl, libpg-perl, libarchive-zip-perl, libyaml-perl, libio-stringy-perl, libtemplate-perl, libpdf-api2-perl, libcgi-ajax-perl, liblist-moreutils-perl, libxml-writer-perl, libtext-csv-xs-perl | libtext-csv-perl, liburi-perl, libdatetime-perl, libtext-iconv-perl, libclass-accessor-perl, libemail-address-perl, libparent-perl, librose-object-perl, librose-db-perl, librose-db-object-perl, libsort-naturally-perl | perl, libparams-validate-perl, libfcgi-perl, libconfig-std-perl +Suggests: tetex-base | texlive-latex-base, tetex-bin | texlive-base-bin , tetex-extra | texlive-latex-extra, xpdf | evince | okular Homepage: http://www.lx-office.org Description: Extended double entry accounting system for the german market. Lx-Office is derived from sql-ledger and rewritten diff --git a/DEBIAN/DEBIAN/postinst b/DEBIAN/DEBIAN/postinst index 7ad2abd9c..05ac9e18e 100755 --- a/DEBIAN/DEBIAN/postinst +++ b/DEBIAN/DEBIAN/postinst @@ -99,22 +99,43 @@ mk_links() { fi; fi; } -reload_web_server() { - if [ -f /etc/init.d/apache* ] ; then - /etc/init.d/apache* reload +web_server_ctrl() { + local action=$1 + if [ -x "/etc/init.d/apache2" ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d apache2 $action ||true + else + /etc/init.d/apache2 $action ||true + fi fi if [ -f /etc/init.d/cherokee ] ; then - /etc/init.d/cherokee reload + /etc/init.d/cherokee $action || true fi if [ -f /etc/init.d/lighttpd ] ; then - /etc/init.d/lighttpd reload + /etc/init.d/lighttpd $action || true + fi + + # if [ $action = restart ] ; then + # echo Sleeping + # sleep 5 + # echo Awake + # fi +} + +enable_fcgi() { + if [ -x /usr/sbin/a2enmod -a -f /usr/lib/apache2/modules/mod_fcgid.so ] ; then + /usr/sbin/a2enmod fcgid + # web_server_ctrl restart fi } + case "$1" in upgrade) echo " ! "`date`" $1 !" >> $debugfile + enable_fcgi + VER=`cat /var/www/lx-office-erp/VERSION | cut -d '.' -f2` if [ $VER = '6' ]; then echo " ! 2.6 !" >> $debugfile @@ -130,12 +151,18 @@ case "$1" in fi; set_user_rights - reload_web_server + ps auxw + + db_stop || true + web_server_ctrl restart + ;; install|configure) echo " ! "`date`" $1 !" >> $debugfile + enable_fcgi + mk_new_menu mk_new_config config_postgresql_factory_script @@ -144,7 +171,9 @@ case "$1" in mk_links set_user_rights - reload_web_server + + db_stop || true + web_server_ctrl restart ;; diff --git a/DEBIAN/mk_erp_deb.sh b/DEBIAN/mk_erp_deb.sh index d656752a1..cfb062448 100755 --- a/DEBIAN/mk_erp_deb.sh +++ b/DEBIAN/mk_erp_deb.sh @@ -44,6 +44,7 @@ cp -a $SRC/scripts usr/lib/lx-office-erp cp -a $SRC/sql usr/lib/lx-office-erp cp -a $SRC/t usr/lib/lx-office-erp cp -a $SRC/*.pl usr/lib/lx-office-erp +cp -a $SRC/dispatcher.f* usr/lib/lx-office-erp cp $SRC/VERSION usr/lib/lx-office-erp cp $SRC/index.html usr/lib/lx-office-erp cp $SRC/config/lx_office.conf.default etc/lx-office-erp/lx_office.conf.default @@ -79,10 +80,8 @@ find etc/ -name "*" -type f -exec md5sum {} \; >> DEBIAN/md5sum SIZE=`du -scb . | grep insgesamt | cut -f1` #Controlfile updaten: -cat DEBIAN/control | sed --expression "s/Installed-Size: 0/Installed-Size: $SIZE/g" > DEBIAN/1.tmp -mv DEBIAN/1.tmp DEBIAN/control -cat DEBIAN/control | sed --expression "s/Version: 0/Version: $VER-$NR/g" > DEBIAN/1.tmp -mv DEBIAN/1.tmp DEBIAN/control +sed --in-place --expression "s/Installed-Size: 0/Installed-Size: $SIZE/g" DEBIAN/control +sed --in-place --expression "s/Version: 0/Version: $VER-$NR/g" DEBIAN/control #Revisionsnummer evtl. von Hand eintragen #Paket bauen: diff --git a/DEBIAN/struktur.tgz b/DEBIAN/struktur.tgz index a1b01c240ff29fbb6d4dcba0dda4b2c4ccccb41d..99ae8ad0d3c03863ccae5c9045a50dfaf5dc855f 100644 GIT binary patch literal 2828 zcmaLXX*iUN+W_#vu{%_jvNa?*BHOWtAxn~_vJ53#lWaAKvX$o`OART@kt`!iDKR0# z$ufk&*tZ!=O!nPanwT;3Jbzv9_xJvIU)Q~U_`xxJFe~)F9gJ%uPcU56S)$`Ivfyc! zSUk6z;guu!0qwuDQJ+K0o(yotUz?_NXlHAir)O{W6o26ph~>sR6(oXFbaFQ7LQs%YZxXu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