Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7cfa7f11

Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt

  • ID 7cfa7f117f02bbcab19bc265aec1469ea9949041
  • Vorgänger 9e96fa63
  • Nachfolger 808d898e

Unbenutzten Code entfernt

Unterschiede anzeigen:

DEBIAN/DEBIAN/postinst
33 33
}
34 34

  
35 35

  
36
config_postgresql_accounts_sec() {
37

  
38
        POSTGRESQL_PG_HBA_CONF="/etc/postgresql/8.3/main/pg_hba.conf"
39

  
40
        echo "# added by lx-office-erp postinst-script" >> $POSTGRESQL_PG_HBA_CONF
41
        echo "host            all lx_office_erp 127.0.0.1 255.255.255.0 password" >> $POSTGRESQL_PG_HBA_CONF
42

  
43
        /etc/init.d/postgresql* reload
44
}
45

  
46

  
47
config_postgresql_roles() {
48

  
49
        echo "CREATE USER lx_office_erp with CREATEDB ;" > /tmp/lxdb-install.sql
50

  
51
        db_get lx-office-erp/lx-office-erp-user-postgresql-password
52
        POSTGRES_LX_OFFICE_ERP_USER_PASSWORD="$RET"
53

  
54
        echo "ALTER USER lx_office_erp PASSWORD '$POSTGRES_LX_OFFICE_ERP_USER_PASSWORD' ;" \
55
         >> /tmp/lxdb-install.sql
56

  
57
        echo "UPDATE pg_language SET lanpltrusted = true WHERE lanname = 'plpgsql';" >> /tmp/lxdb-instal.sql
58

  
59
        su postgres -c "psql --dbname template1 < /tmp/lxdb-install.sql"
60

  
61
        /etc/init.d/postgresql* reload
62
}
63

  
64

  
65

  
66
config_postgresql_sql_routines() {
67

  
68
        PLPGSQL="/usr/lib/postgresql/8.3/lib/plpgsql.so"
69
        echo "CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler" > /tmp/lxdb-install.sql
70
        echo "AS '$PLPGSQL', 'plpgsql_call_handler'" >> /tmp/lxdb-install.sql
71
        echo "LANGUAGE c;" >> /tmp/lxdb-install.sql
72
        echo "CREATE PROCEDURAL LANGUAGE plpgsql HANDLER plpgsql_call_handler;" >> /tmp/lxdb-install.sql
73
        su postgres -c "psql --dbname template1 < /tmp/lxdb-install.sql"
74

  
75
        /etc/init.d/postgresql-8.3 reload
76
}
77

  
78

  
79 36
set_lx_office_erp_web_admin_password() {
80 37
        db_get lx-office-erp/admin-password
81 38
        ADMINPASSWORD="$RET"
......
101 58
        chmod 0600 /etc/lx-office-erp/lx_office.conf
102 59
}
103 60

  
104
disable_ipv6_on_lo_interface() {
105
        #Ist wohl nicht mehr notwendig.
106
        # 2009-04-25
107
        # Perls Libraries are not yet ipv6 read
108
        echo "WICHTIG: ipv6 ist nunmehr auf dem Loopback-Interface deaktiviert, um die Funktionsfähigkeit von Lx-Office-ERP zu gewährleisten!"
109
        ifconfig lo inet6 del ::1/128 2> /dev/null || true
110

  
111
        # make the changes permanent (triggered on next reboot)
112
        RCLOCAL="/etc/rc.local"
113
        echo "# lx-office-erp: Perl libraries are not yet fully ipv6-ready" >> $RCLOCAL
114
        echo "ifconfig lo inet6 del ::1/128" >> $RCLOCAL
115

  
116
}
117 61
mk_new_menu() {
118 62
    if [ -e /usr/lib/lx-office-crm ] ; then
119 63
        #crm vorhanden, dann die menu.ini mit der höchsten VersNr nehmen
......
180 124
            config_postgresql_factory_script
181 125
            set_lx_office_erp_web_admin_password
182 126
            set_lx_office_erp_authentication_db_user_password
183
            #  disable_ipv6_on_lo_interface
184 127
            mk_links
185 128
        fi;
186 129

  
......
196 139
        config_postgresql_factory_script
197 140
        set_lx_office_erp_web_admin_password
198 141
        set_lx_office_erp_authentication_db_user_password
199
        # disable_ipv6_on_lo_interface
200 142
        mk_links
201 143

  
202 144
        set_user_rights
......
213 155
    ;;
214 156
esac
215 157

  
216
# dh_installdeb will replace this with shell code automatically
217
# generated by other debhelper scripts.
218

  
219

  
220 158
echo "done!!"
221 159

  
222 160
exit 0

Auch abrufbar als: Unified diff