Revision e2b32763
Von Holger Lindemann vor etwa 14 Jahren hinzugefügt
DEBIAN/DEBIAN/postinst | ||
---|---|---|
|
||
set_lx_office_erp_web_admin_password() {
|
||
|
||
if ! [ -f /etc/lx-office-erp/lx_office.conf ] ; then
|
||
cp /etc/lx-office-erp/lx_office.conf.default /etc/lx-office-erp/lx_office.conf
|
||
fi
|
||
db_get lx-office-erp/admin-password
|
||
ADMINPASSWORD="$RET"
|
||
|
||
cat /etc/lx-office-erp/lx_office.conf | \
|
||
cat /etc/lx-office-erp/authentication.pl | \
|
||
sed --expression "s/admin_password = /admin_password = $ADMINPASSWORD/g" \
|
||
> /tmp/1.txt
|
||
|
||
mv /tmp/1.txt /etc/lx-office-erp/lx_office.conf
|
||
mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
|
||
|
||
}
|
||
|
||
... | ... | |
db_get lx-office-erp/lx-office-erp-user-postgresql-password
|
||
PASSWORD="$RET"
|
||
|
||
cat /etc/lx-office-erp/lx_office.conf | \
|
||
cat /etc/lx-office-erp/authentication.pl | \
|
||
sed --expression "s/^password = /password = $PASSWORD/g" \
|
||
> /tmp/1.txt
|
||
|
||
cat /tmp/1.txt | \
|
||
sed --expression "s/^user = postgres/user = lxoffice/g" \
|
||
> /etc/lx-office-erp/lx_office.conf
|
||
> /etc/lx-office-erp/authentication.pl
|
||
|
||
}
|
||
|
||
... | ... | |
set_user_rights() {
|
||
chown -R www-data:www-data /usr/lib/lx-office-erp/users
|
||
chown -R www-data:www-data /usr/lib/lx-office-erp/templates
|
||
chown www-data:www-data /etc/lx-office-erp/lx_office.conf
|
||
chown www-data:www-data /etc/lx-office-erp/lx-erp.conf
|
||
chown www-data:www-data /etc/lx-office-erp/authentication.pl
|
||
chown www-data:www-data /etc/lx-office-erp/console.conf
|
||
chown www-data:www-data /usr/lib/lx-office-erp/menu.ini
|
||
chmod 0600 /etc/lx-office-erp/lx_office.conf
|
||
chmod 0600 /etc/lx-office-erp/lx-erp.conf
|
||
chmod 0600 /etc/lx-office-erp/authentication.pl
|
||
}
|
||
|
||
disable_ipv6_on_lo_interface() {
|
||
... | ... | |
}
|
||
|
||
mk_new_config() {
|
||
if ! [ -f /etc/lx-office-erp/lx_office.conf ] ; then
|
||
cp /etc/lx-office-erp/lx_office.conf.default /etc/lx-office-erp/lx_office.conf
|
||
if ! [ -f /etc/lx-office-erp/lx-erp.conf ] ; then
|
||
cp /etc/lx-office-erp/lx-erp.conf.default /etc/lx-office-erp/lx-erp.conf
|
||
fi
|
||
if ! [ -f /etc/lx-office-erp/authentication.pl ] ; then
|
||
cp /etc/lx-office-erp/authentication.pl.default /etc/lx-office-erp/authentication.pl
|
||
fi
|
||
if ! [ -f /etc/lx-office-erp/console.conf ] ; then
|
||
cp /etc/lx-office-erp/console.conf.default /etc/lx-office-erp/console.conf
|
||
fi
|
||
}
|
||
|
||
mk_links() {
|
||
if ! [ -f /usr/lib/lx-office-erp/config/lx_office.conf ] ; then
|
||
ln -s /etc/lx-office-erp/lx_office.conf /usr/lib/lx-office-erp/config/lx_office.conf
|
||
fi;
|
||
if ! [ -f /usr/lib/lx-office-erp/config/lx_office.conf.default ] ; then
|
||
ln -s /etc/lx-office-erp/lx_office.conf.default /usr/lib/lx-office-erp/config/lx_office.conf.default
|
||
if ! [ -f /usr/lib/lx-office-erp/config/lx-erp.conf ] ; then
|
||
ln -s /etc/lx-office-erp/lx-erp.conf /usr/lib/lx-office-erp/config/lx-erp.conf
|
||
fi;
|
||
if [ -e /etc/lx-office-erp/authentication.pl ] ; then
|
||
rm /etc/lx-office-erp/authentication.pl
|
||
if ! [ -f /usr/lib/lx-office-erp/config/authentication.pl ] ; then
|
||
ln -s /etc/lx-office-erp/authentication.pl /usr/lib/lx-office-erp/config/authentication.pl
|
||
fi
|
||
if [ -e /etc/apache2 ] ; then
|
||
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