Fixes #3834 - Package installation creates database.yml as root and thus breaks the installation until next update

This commit is contained in:
Marcel Herrguth 2021-11-04 11:32:37 +01:00
parent 907062b7eb
commit c75141c2ff

View file

@ -181,6 +181,9 @@ function update_database_yml () {
-e "s/.*username:.*/ username: ${DB_USER}/" \ -e "s/.*username:.*/ username: ${DB_USER}/" \
-e "s/.*password:.*/ password: ${DB_PASS}/" \ -e "s/.*password:.*/ password: ${DB_PASS}/" \
-e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/contrib/packager.io/database.yml.pkgr > ${ZAMMAD_DIR}/config/database.yml -e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/contrib/packager.io/database.yml.pkgr > ${ZAMMAD_DIR}/config/database.yml
echo "# ... Fixing permission database.yml"
chown zammad:zammad ${ZAMMAD_DIR}/config/database.yml
} }
function initialise_database () { function initialise_database () {