81 |
81 |
db_get lx-office-erp/admin-password
|
82 |
82 |
ADMINPASSWORD="$RET"
|
83 |
83 |
|
84 |
|
cat /etc/lx-office-erp/authentication.pl | \
|
85 |
|
sed --expression "s/{admin_password} = /{admin_password} = '$ADMINPASSWORD';#/g" \
|
|
84 |
cat /etc/lx-office-erp/lx_office.conf | \
|
|
85 |
sed --expression "s/{admin_password} = /{admin_password} = $ADMINPASSWORD/g" \
|
86 |
86 |
> /tmp/1.txt
|
87 |
87 |
|
88 |
|
mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
|
|
88 |
mv /tmp/1.txt /etc/lx-office-erp/lx_office.conf
|
89 |
89 |
|
90 |
90 |
}
|
91 |
91 |
|
... | ... | |
94 |
94 |
db_get lx-office-erp/lx-office-erp-user-postgresql-password
|
95 |
95 |
PASSWORD="$RET"
|
96 |
96 |
|
97 |
|
cat /etc/lx-office-erp/authentication.pl | \
|
98 |
|
sed --expression "s/'password' => /'password' => '$PASSWORD', #/g" \
|
|
97 |
cat /etc/lx-office-erp/lx_office.conf | \
|
|
98 |
sed --expression "s/'password' = /'password' = $PASSWORD/g" \
|
99 |
99 |
> /tmp/1.txt
|
100 |
100 |
|
101 |
101 |
cat /tmp/1.txt | \
|
102 |
102 |
sed --expression "s/^user = postgres/user = lxoffice/g" \
|
103 |
|
> /etc/lx-office-erp/authentication.pl
|
|
103 |
> /etc/lx-office-erp/lx_office.conf
|
104 |
104 |
|
105 |
105 |
}
|
106 |
106 |
|
... | ... | |
108 |
108 |
set_user_rights() {
|
109 |
109 |
chown -R www-data:www-data /usr/lib/lx-office-erp/users
|
110 |
110 |
chown -R www-data:www-data /usr/lib/lx-office-erp/templates
|
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
|
|
111 |
chown www-data:www-data /etc/lx-office-erp/lx_office.conf
|
114 |
112 |
chown www-data:www-data /usr/lib/lx-office-erp/menu.ini
|
115 |
|
chmod 0600 /etc/lx-office-erp/lx-erp.conf
|
116 |
|
chmod 0600 /etc/lx-office-erp/authentication.pl
|
|
113 |
chmod 0600 /etc/lx-office-erp/lx_office.conf
|
117 |
114 |
}
|
118 |
115 |
|
119 |
116 |
disable_ipv6_on_lo_interface() {
|
... | ... | |
142 |
139 |
}
|
143 |
140 |
|
144 |
141 |
mk_new_config() {
|
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
|
|
142 |
if ! [ -f /etc/lx-office-erp/lx_office.conf ] ; then
|
|
143 |
cp /etc/lx-office-erp/lx_office.conf.default /etc/lx-office-erp/lx_office.conf
|
153 |
144 |
fi
|
154 |
145 |
}
|
155 |
146 |
|
156 |
147 |
mk_links() {
|
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
|
159 |
|
fi;
|
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
|
|
148 |
if ! [ -f /usr/lib/lx-office-erp/config/lx_office.conf ] ; then
|
|
149 |
ln -s /etc/lx-office-erp/lx_office.conf /usr/lib/lx-office-erp/config/lx_office.conf
|
162 |
150 |
fi
|
163 |
151 |
if [ -e /etc/apache2 ] ; then
|
164 |
152 |
if ! [ -f /etc/apache2/conf.d/lx-office-erp.apache2.conf ] ; then
|
... | ... | |
194 |
182 |
echo " ! "`date`" $1 !" >> /tmp/lxo-erp.log
|
195 |
183 |
|
196 |
184 |
VER=`cat /var/www/lx-office-erp/VERSION | cut -d '.' -f2`
|
197 |
|
if [ $VER = '6' ]; then
|
198 |
|
echo " ! 2.6 !" >> /tmp/lxo-erp.log
|
199 |
|
echo "Version 2.6.x"
|
|
185 |
if [ $VER = '7' ]; then
|
|
186 |
echo " ! 2.7 !" >> /tmp/lxo-erp.log
|
|
187 |
echo "Version 2.7.x"
|
200 |
188 |
mk_new_menu
|
201 |
189 |
else
|
202 |
190 |
mk_new_menu
|
Anpassung an neues Conffile, Abhängigkeiten