Revision e2b32763
Von Holger Lindemann vor fast 14 Jahren hinzugefügt
DEBIAN/DEBIAN/postinst | ||
---|---|---|
78 | 78 |
|
79 | 79 |
set_lx_office_erp_web_admin_password() { |
80 | 80 |
|
81 |
if ! [ -f /etc/lx-office-erp/lx_office.conf ] ; then |
|
82 |
cp /etc/lx-office-erp/lx_office.conf.default /etc/lx-office-erp/lx_office.conf |
|
83 |
fi |
|
84 | 81 |
db_get lx-office-erp/admin-password |
85 | 82 |
ADMINPASSWORD="$RET" |
86 | 83 |
|
87 |
cat /etc/lx-office-erp/lx_office.conf | \
|
|
84 |
cat /etc/lx-office-erp/authentication.pl | \
|
|
88 | 85 |
sed --expression "s/admin_password = /admin_password = $ADMINPASSWORD/g" \ |
89 | 86 |
> /tmp/1.txt |
90 | 87 |
|
91 |
mv /tmp/1.txt /etc/lx-office-erp/lx_office.conf
|
|
88 |
mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
|
|
92 | 89 |
|
93 | 90 |
} |
94 | 91 |
|
... | ... | |
97 | 94 |
db_get lx-office-erp/lx-office-erp-user-postgresql-password |
98 | 95 |
PASSWORD="$RET" |
99 | 96 |
|
100 |
cat /etc/lx-office-erp/lx_office.conf | \
|
|
97 |
cat /etc/lx-office-erp/authentication.pl | \
|
|
101 | 98 |
sed --expression "s/^password = /password = $PASSWORD/g" \ |
102 | 99 |
> /tmp/1.txt |
103 | 100 |
|
104 | 101 |
cat /tmp/1.txt | \ |
105 | 102 |
sed --expression "s/^user = postgres/user = lxoffice/g" \ |
106 |
> /etc/lx-office-erp/lx_office.conf
|
|
103 |
> /etc/lx-office-erp/authentication.pl
|
|
107 | 104 |
|
108 | 105 |
} |
109 | 106 |
|
... | ... | |
111 | 108 |
set_user_rights() { |
112 | 109 |
chown -R www-data:www-data /usr/lib/lx-office-erp/users |
113 | 110 |
chown -R www-data:www-data /usr/lib/lx-office-erp/templates |
114 |
chown www-data:www-data /etc/lx-office-erp/lx_office.conf |
|
111 |
chown www-data:www-data /etc/lx-office-erp/lx-erp.conf |
|
112 |
chown www-data:www-data /etc/lx-office-erp/authentication.pl |
|
113 |
chown www-data:www-data /etc/lx-office-erp/console.conf |
|
115 | 114 |
chown www-data:www-data /usr/lib/lx-office-erp/menu.ini |
116 |
chmod 0600 /etc/lx-office-erp/lx_office.conf |
|
115 |
chmod 0600 /etc/lx-office-erp/lx-erp.conf |
|
116 |
chmod 0600 /etc/lx-office-erp/authentication.pl |
|
117 | 117 |
} |
118 | 118 |
|
119 | 119 |
disable_ipv6_on_lo_interface() { |
... | ... | |
142 | 142 |
} |
143 | 143 |
|
144 | 144 |
mk_new_config() { |
145 |
if ! [ -f /etc/lx-office-erp/lx_office.conf ] ; then |
|
146 |
cp /etc/lx-office-erp/lx_office.conf.default /etc/lx-office-erp/lx_office.conf |
|
145 |
if ! [ -f /etc/lx-office-erp/lx-erp.conf ] ; then |
|
146 |
cp /etc/lx-office-erp/lx-erp.conf.default /etc/lx-office-erp/lx-erp.conf |
|
147 |
fi |
|
148 |
if ! [ -f /etc/lx-office-erp/authentication.pl ] ; then |
|
149 |
cp /etc/lx-office-erp/authentication.pl.default /etc/lx-office-erp/authentication.pl |
|
150 |
fi |
|
151 |
if ! [ -f /etc/lx-office-erp/console.conf ] ; then |
|
152 |
cp /etc/lx-office-erp/console.conf.default /etc/lx-office-erp/console.conf |
|
147 | 153 |
fi |
148 | 154 |
} |
149 | 155 |
|
150 | 156 |
mk_links() { |
151 |
if ! [ -f /usr/lib/lx-office-erp/config/lx_office.conf ] ; then |
|
152 |
ln -s /etc/lx-office-erp/lx_office.conf /usr/lib/lx-office-erp/config/lx_office.conf |
|
153 |
fi; |
|
154 |
if ! [ -f /usr/lib/lx-office-erp/config/lx_office.conf.default ] ; then |
|
155 |
ln -s /etc/lx-office-erp/lx_office.conf.default /usr/lib/lx-office-erp/config/lx_office.conf.default |
|
157 |
if ! [ -f /usr/lib/lx-office-erp/config/lx-erp.conf ] ; then |
|
158 |
ln -s /etc/lx-office-erp/lx-erp.conf /usr/lib/lx-office-erp/config/lx-erp.conf |
|
156 | 159 |
fi; |
157 |
if [ -e /etc/lx-office-erp/authentication.pl ] ; then
|
|
158 |
rm /etc/lx-office-erp/authentication.pl
|
|
160 |
if ! [ -f /usr/lib/lx-office-erp/config/authentication.pl ] ; then
|
|
161 |
ln -s /etc/lx-office-erp/authentication.pl /usr/lib/lx-office-erp/config/authentication.pl
|
|
159 | 162 |
fi |
160 | 163 |
if [ -e /etc/apache2 ] ; then |
161 | 164 |
if ! [ -f /etc/apache2/conf.d/lx-office-erp.apache2.conf ] ; then |
Auch abrufbar als: Unified diff
Hmpf! Wieso hat den Schwachsinn noch keiner bemerkt?
Namen lx-erp.conf + authentication.pl