- echo "Starting factory postgresql config script: scripts/inst_postgres_deb.sh.."
- cd /usr/lib/lx-office-erp/
- ./scripts/inst_postgres_deb.sh
- echo "Factory postgresql config script done."
-}
-
-
-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
+ echo "Starting factory postgresql config script: scripts/inst_postgres_deb.sh.."
+ cd /usr/lib/lx-office-erp/
+ ./scripts/inst_postgres_deb.sh
+ echo "Factory postgresql config script done."