db_get lx-office-erp/admin-password
ADMINPASSWORD="$RET"
- #cat /usr/lib/lx-office-erp/config/authentication.pl.default | \
cat /etc/lx-office-erp/authentication.pl.default | \
sed --expression "s/\$self->{admin_password} = 'admin';/\$self->{admin_password} = '$ADMINPASSWORD';/g" \
> /tmp/1.txt
- #mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
- #chmod 0600 /usr/lib/lx-office-erp/config/authentication.pl
- #chown www-data:www-data /usr/lib/lx-office-erp/config/authentication.pl
-
}
db_get lx-office-erp/lx-office-erp-user-postgresql-password
PASSWORD="$RET"
- #cat /usr/lib/lx-office-erp/config/authentication.pl | \
cat /etc/lx-office-erp/authentication.pl | \
sed --expression "s/'password' => '',/'password' => '$PASSWORD',/g" \
> /tmp/1.txt
- #mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
}
set_lx_office_erp_authentication_db_user() {
USER="lxoffice"
- #cat /usr/lib/lx-office-erp/config/authentication.pl | \
cat /etc/lx-office-erp/authentication.pl | \
sed --expression "s/'user' => 'postgres',/'user' => '$USER',/g" \
> /tmp/1.txt
- #mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
mv /tmp/1.txt /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 /usr/lib/lx-office-erp/menu.ini
- chown www-data:www-data /etc/lx-office-erp/authentication.pl
- chmod 0600 /etc/lx-office-erp/lx_office.conf
- chmod 0600 /etc/lx-office-erp/authentication.pl
+ chown www-data:www-data /etc/lx-office-erp/lx_office.conf
+ chown www-data:www-data /usr/lib/lx-office-erp/menu.ini
+ chown www-data:www-data /etc/lx-office-erp/authentication.pl
+ chmod 0600 /etc/lx-office-erp/lx_office.conf
+ chmod 0600 /etc/lx-office-erp/authentication.pl
}
disable_ipv6_on_lo_interface() {
ln -s /etc/lx-office-erp/lx-office-erp.cherokee /etc/cherokee/sites-available/lx-office-erp.cherokee
fi;
fi;
+ if [ -e /etc/lighttpd ] ; then
+ if ! [ -f /etc/lighttpd/conf-enabled/lx-office-erp.lighttpd ] ; then
+ ln -s /etc/lx-office-erp/lx-office-erp.lighttpd /etc/lighttpf/conf-enabled/10-lx-office-erp
+ fi;
+ fi;
}
reload_web_server() {
if [ -f /etc/init.d/apache* ] ; then
if [ -f /etc/init.d/cherokee ] ; then
/etc/init.d/cherokee reload
fi
+ if [ -f /etc/init.d/lighttpd ] ; then
+ /etc/init.d/lighttpd reload
+ fi
}
case "$1" in