X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=DEBIAN%2FDEBIAN%2Fpostinst;h=a681b98da8205a19db9b24848d08628b2507c2f5;hb=cc47124952e133ee4edbc116d927b90040dc8a05;hp=02f5ac927a423b2bc654fb3f85994b7d9b63e71f;hpb=e055700faea1906bea6c03184ba4516b57cac887;p=kivitendo-erp.git diff --git a/DEBIAN/DEBIAN/postinst b/DEBIAN/DEBIAN/postinst index 02f5ac927..a681b98da 100755 --- a/DEBIAN/DEBIAN/postinst +++ b/DEBIAN/DEBIAN/postinst @@ -81,8 +81,8 @@ set_lx_office_erp_web_admin_password() { db_get lx-office-erp/admin-password ADMINPASSWORD="$RET" - cat /etc/lx-office-erp/authentication.pl.default | \ - sed --expression "s/\$self->{admin_password} = 'admin';/\$self->{admin_password} = '$ADMINPASSWORD';/g" \ + cat /etc/lx-office-erp/authentication.pl | \ + sed --expression "s/{admin_password} = /{admin_password} = '$ADMINPASSWORD';#/g" \ > /tmp/1.txt mv /tmp/1.txt /etc/lx-office-erp/authentication.pl @@ -90,39 +90,34 @@ set_lx_office_erp_web_admin_password() { } -set_lx_office_erp_authentication_db_password() { +set_lx_office_erp_authentication_db_user_password() { db_get lx-office-erp/lx-office-erp-user-postgresql-password PASSWORD="$RET" cat /etc/lx-office-erp/authentication.pl | \ - sed --expression "s/'password' => '',/'password' => '$PASSWORD',/g" \ + sed --expression "s/'password' => /'password' => '$PASSWORD', #/g" \ > /tmp/1.txt - mv /tmp/1.txt /etc/lx-office-erp/authentication.pl + cat /tmp/1.txt | \ + sed --expression "s/^user = postgres/user = lxoffice/g" \ + > /etc/lx-office-erp/authentication.pl } -set_lx_office_erp_authentication_db_user() { - USER="lxoffice" - - cat /etc/lx-office-erp/authentication.pl | \ - sed --expression "s/'user' => 'postgres',/'user' => '$USER',/g" \ - > /tmp/1.txt - - mv /tmp/1.txt /etc/lx-office-erp/authentication.pl -} set_user_rights() { chown -R www-data:www-data /usr/lib/lx-office-erp/users chown -R www-data:www-data /usr/lib/lx-office-erp/templates - chown www-data:www-data /etc/lx-office-erp/lx_office.conf - chown www-data:www-data /usr/lib/lx-office-erp/menu.ini + chown www-data:www-data /etc/lx-office-erp/lx-erp.conf chown www-data:www-data /etc/lx-office-erp/authentication.pl - chmod 0600 /etc/lx-office-erp/lx_office.conf + chown www-data:www-data /etc/lx-office-erp/console.conf + chown www-data:www-data /usr/lib/lx-office-erp/menu.ini + chmod 0600 /etc/lx-office-erp/lx-erp.conf chmod 0600 /etc/lx-office-erp/authentication.pl } disable_ipv6_on_lo_interface() { + #Ist wohl nicht mehr notwendig. # 2009-04-25 # Perls Libraries are not yet ipv6 read echo "WICHTIG: ipv6 ist nunmehr auf dem Loopback-Interface deaktiviert, um die Funktionsfähigkeit von Lx-Office-ERP zu gewährleisten!" @@ -147,18 +142,24 @@ mk_new_menu() { } mk_new_config() { - if ! [ -f /etc/lx-office-erp/lx_office.conf ] ; then - cp /etc/lx-office-erp/lx_office.conf.default /etc/lx-office-erp/lx_office.conf + if ! [ -f /etc/lx-office-erp/lx-erp.conf ] ; then + cp /etc/lx-office-erp/lx-erp.conf.default /etc/lx-office-erp/lx-erp.conf + fi + if ! [ -f /etc/lx-office-erp/authentication.pl ] ; then + cp /etc/lx-office-erp/authentication.pl.default /etc/lx-office-erp/authentication.pl + fi + if ! [ -f /etc/lx-office-erp/console.conf ] ; then + cp /etc/lx-office-erp/console.conf.default /etc/lx-office-erp/console.conf fi } mk_links() { + if ! [ -f /usr/lib/lx-office-erp/config/lx-erp.conf ] ; then + ln -s /etc/lx-office-erp/lx-erp.conf /usr/lib/lx-office-erp/config/lx-erp.conf + fi; if ! [ -f /usr/lib/lx-office-erp/config/authentication.pl ] ; then ln -s /etc/lx-office-erp/authentication.pl /usr/lib/lx-office-erp/config/authentication.pl - fi; - if ! [ -f /usr/lib/lx-office-erp/config/lx_office.conf ] ; then - ln -s /etc/lx-office-erp/lx_office.conf /usr/lib/lx-office-erp/config/lx_office.conf - fi; + fi if [ -e /etc/apache2 ] ; then if ! [ -f /etc/apache2/conf.d/lx-office-erp.apache2.conf ] ; then ln -s /etc/lx-office-erp/lx-office-erp.apache2.conf /etc/apache2/conf.d/lx-office-erp.apache2.conf @@ -170,6 +171,11 @@ mk_links() { ln -s /etc/lx-office-erp/lx-office-erp.cherokee /etc/cherokee/sites-available/lx-office-erp.cherokee fi; fi; + if [ -e /etc/lighttpd ] ; then + if ! [ -f /etc/lighttpd/conf-enabled/lx-office-erp.lighttpd ] ; then + ln -s /etc/lx-office-erp/lx-office-erp.lighttpd /etc/lighttpf/conf-enabled/10-lx-office-erp + fi; + fi; } reload_web_server() { if [ -f /etc/init.d/apache* ] ; then @@ -178,6 +184,9 @@ reload_web_server() { if [ -f /etc/init.d/cherokee ] ; then /etc/init.d/cherokee reload fi + if [ -f /etc/init.d/lighttpd ] ; then + /etc/init.d/lighttpd reload + fi } case "$1" in @@ -187,16 +196,15 @@ case "$1" in VER=`cat /var/www/lx-office-erp/VERSION | cut -d '.' -f2` if [ $VER = '6' ]; then echo " ! 2.6 !" >> /tmp/lxo-erp.log - echo "Version 2.6" + echo "Version 2.6.x" mk_new_menu else mk_new_menu mk_new_config config_postgresql_factory_script set_lx_office_erp_web_admin_password - set_lx_office_erp_authentication_db_user - set_lx_office_erp_authentication_db_password - disable_ipv6_on_lo_interface + set_lx_office_erp_authentication_db_user_password + # disable_ipv6_on_lo_interface mk_links fi; @@ -211,9 +219,8 @@ case "$1" in mk_new_config config_postgresql_factory_script set_lx_office_erp_web_admin_password - set_lx_office_erp_authentication_db_user - set_lx_office_erp_authentication_db_password - disable_ipv6_on_lo_interface + set_lx_office_erp_authentication_db_user_password + # disable_ipv6_on_lo_interface mk_links set_user_rights