From: Moritz Bunkus Date: Tue, 14 Jun 2011 13:52:46 +0000 (+0200) Subject: mod_fcgid benutzen X-Git-Tag: release-2.6.3~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=749f3e348f2e0d2250f86ebff8dfbda5a645a344;p=kivitendo-erp.git mod_fcgid benutzen --- 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 a1b01c240..99ae8ad0d 100644 Binary files a/DEBIAN/struktur.tgz and b/DEBIAN/struktur.tgz differ