}
-config_postgresql_accounts_sec() {
-
- POSTGRESQL_PG_HBA_CONF="/etc/postgresql/8.3/main/pg_hba.conf"
-
- echo "# added by lx-office-erp postinst-script" >> $POSTGRESQL_PG_HBA_CONF
- echo "host all lx_office_erp 127.0.0.1 255.255.255.0 password" >> $POSTGRESQL_PG_HBA_CONF
-
- /etc/init.d/postgresql* reload
-}
-
-
-config_postgresql_roles() {
-
- echo "CREATE USER lx_office_erp with CREATEDB ;" > /tmp/lxdb-install.sql
-
- db_get lx-office-erp/lx-office-erp-user-postgresql-password
- POSTGRES_LX_OFFICE_ERP_USER_PASSWORD="$RET"
-
- echo "ALTER USER lx_office_erp PASSWORD '$POSTGRES_LX_OFFICE_ERP_USER_PASSWORD' ;" \
- >> /tmp/lxdb-install.sql
-
- echo "UPDATE pg_language SET lanpltrusted = true WHERE lanname = 'plpgsql';" >> /tmp/lxdb-instal.sql
-
- su postgres -c "psql --dbname template1 < /tmp/lxdb-install.sql"
-
- /etc/init.d/postgresql* reload
-}
-
-
-
-config_postgresql_sql_routines() {
-
- PLPGSQL="/usr/lib/postgresql/8.3/lib/plpgsql.so"
- echo "CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler" > /tmp/lxdb-install.sql
- echo "AS '$PLPGSQL', 'plpgsql_call_handler'" >> /tmp/lxdb-install.sql
- echo "LANGUAGE c;" >> /tmp/lxdb-install.sql
- echo "CREATE PROCEDURAL LANGUAGE plpgsql HANDLER plpgsql_call_handler;" >> /tmp/lxdb-install.sql
- su postgres -c "psql --dbname template1 < /tmp/lxdb-install.sql"
-
- /etc/init.d/postgresql-8.3 reload
-}
-
-
set_lx_office_erp_web_admin_password() {
db_get lx-office-erp/admin-password
ADMINPASSWORD="$RET"
chmod 0600 /etc/lx-office-erp/lx_office.conf
}
-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!"
- ifconfig lo inet6 del ::1/128 2> /dev/null || true
-
- # make the changes permanent (triggered on next reboot)
- RCLOCAL="/etc/rc.local"
- echo "# lx-office-erp: Perl libraries are not yet fully ipv6-ready" >> $RCLOCAL
- echo "ifconfig lo inet6 del ::1/128" >> $RCLOCAL
-
-}
mk_new_menu() {
if [ -e /usr/lib/lx-office-crm ] ; then
#crm vorhanden, dann die menu.ini mit der höchsten VersNr nehmen
config_postgresql_factory_script
set_lx_office_erp_web_admin_password
set_lx_office_erp_authentication_db_user_password
- # disable_ipv6_on_lo_interface
mk_links
fi;
config_postgresql_factory_script
set_lx_office_erp_web_admin_password
set_lx_office_erp_authentication_db_user_password
- # disable_ipv6_on_lo_interface
mk_links
set_user_rights
;;
esac
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-
echo "done!!"
exit 0