From b77ae760a0f4a4b3f3fd8a4a21a1ba0fe5d39a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sat, 24 Jun 2017 11:51:16 +0200 Subject: [PATCH] added check for existing file --- contrib/packager.io/functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/packager.io/functions b/contrib/packager.io/functions index e821404ff..1d10e9c6b 100644 --- a/contrib/packager.io/functions +++ b/contrib/packager.io/functions @@ -196,7 +196,11 @@ function update_database () { function create_webserver_config () { if [ "${OS}" == "DEBIAN" ]; then if [ ! -f "${WEBSERVER_CONF}" ]; then - cp ${ZAMMAD_DIR}/contrib/${WEBSERVER}/zammad.conf ${WEBSERVER_CONF} + if [ -f "/etc/${WEBSERVER}/sites-enabled/zammad.conf" ]; then + mv /etc/${WEBSERVER}/sites-enabled/zammad.conf ${WEBSERVER_CONF} + else + cp ${ZAMMAD_DIR}/contrib/${WEBSERVER}/zammad.conf ${WEBSERVER_CONF} + fi ln -s ${WEBSERVER_CONF} /etc/${WEBSERVER}/sites-enabled/zammad.conf fi if [ "${WEBSERVER}" == "apache2" ]; then