postinstall.sh check if symlink already exists

This commit is contained in:
André Bauer 2016-10-25 18:27:30 +02:00
parent 1f30f416c4
commit 1ee250fc5b

View file

@ -55,7 +55,7 @@ if [ -d /etc/nginx/sites-enabled ]; then
# copy nginx config
cp ${ZAMMAD_DIR}/contrib/nginx/sites-available/zammad.conf /etc/nginx/sites-available/zammad.conf
# creating symlink
ln -s /etc/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf
test -h /etc/nginx/sites-available/zammad.conf || ln -s /etc/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf
# restart nginx
systemctl restart nginx
fi