commit
ab6d2086d9
1 changed files with 6 additions and 3 deletions
|
@ -9,8 +9,11 @@ ZAMMAD_DIR="/opt/zammad"
|
||||||
DB="zammad_production"
|
DB="zammad_production"
|
||||||
DB_USER="zammad"
|
DB_USER="zammad"
|
||||||
|
|
||||||
# get existing db pass
|
# check if database.yml exists
|
||||||
DB_PASS="$(grep "password:" < ${ZAMMAD_DIR}/config/database.yml | sed 's/.*password://')"
|
if [ -f ${ZAMMAD_DIR}/config/database.yml ]; then
|
||||||
|
# get existing db pass
|
||||||
|
DB_PASS="$(grep "password:" < ${ZAMMAD_DIR}/config/database.yml | sed 's/.*password://')"
|
||||||
|
fi
|
||||||
|
|
||||||
# check if db pass exists
|
# check if db pass exists
|
||||||
if [ -z "${DB_PASS}" ]; then
|
if [ -z "${DB_PASS}" ]; then
|
||||||
|
@ -55,7 +58,7 @@ if [ -d /etc/nginx/sites-enabled ]; then
|
||||||
# copy nginx config
|
# copy nginx config
|
||||||
test -f /etc/nginx/sites-available/zammad.conf || cp ${ZAMMAD_DIR}/contrib/nginx/sites-available/zammad.conf /etc/nginx/sites-available/zammad.conf
|
test -f /etc/nginx/sites-available/zammad.conf || cp ${ZAMMAD_DIR}/contrib/nginx/sites-available/zammad.conf /etc/nginx/sites-available/zammad.conf
|
||||||
# creating symlink
|
# creating symlink
|
||||||
test -h /etc/nginx/sites-available/zammad.conf || ln -s /etc/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf
|
test -f /etc/nginx/sites-available/zammad.conf || ln -s /etc/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf
|
||||||
# restart nginx
|
# restart nginx
|
||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue