6 # check configuration file
7 if [ ! -e /opt/kivitendo-erp/config/kivitendo.conf ]
9 echo "Type new kivitendo admin and DB password:"
11 sed "s/admin123/$a/" /opt/kivitendo-erp/config/kivitendo.conf.default >/opt/kivitendo-erp/config/kivitendo.conf
15 if ! su postgres -c "psql -c '\du'" | grep kivitendo >/dev/null
17 echo "No user named 'kivitendo' found. It is now created. Use the same password!"
18 su postgres -c "createuser -dPs kivitendo"
20 main=$(ls -d /etc/postgresql/*/main/)
21 if ! grep kivitendo $main/pg_hba.conf >/dev/null
23 echo "local all kivitendo md5" >> $main/pg_hba.conf
24 systemctl reload postgresql
27 # allow write access to some directories
28 chown www-data /opt/kivitendo-erp/users /opt/kivitendo-erp/templates
29 chgrp www-data /opt/kivitendo-erp/users /opt/kivitendo-erp/templates
31 systemctl restart apache2
33 # call installation check
34 /opt/kivitendo-erp/scripts/installation_check.pl
36 if [ ! -d /opt/kivitendo-erp/webdav ]
38 mkdir /opt/kivitendo-erp/webdav
39 chown www-data:www-data /opt/kivitendo-erp/webdav