diff --git a/debian/postinst b/debian/postinst index 063ab90f12..7301dfe8f1 100755 --- a/debian/postinst +++ b/debian/postinst @@ -73,8 +73,9 @@ case "$1" in mkdir -p /etc/gitlab/ssl if [ -f "${nginx_ssl_conf_example_gz}" ]; then # undo dh_installdocs auto compress - zcat ${nginx_ssl_conf_example_gz} >/tmp/gitlab-ssl - export nginx_conf_example="/tmp/gitlab-ssl" + export nginx_conf_example_tmp=$(mktemp) + zcat ${nginx_ssl_conf_example_gz} > ${nginx_conf_example_tmp} + export nginx_conf_example=${nginx_conf_example_tmp} fi # Check if letsencrypt option is selected @@ -90,10 +91,10 @@ case "$1" in if test -f ${nginx_conf_example}; then sed -e "s/YOUR_SERVER_FQDN/${GITLAB_HOST}/"\ ${nginx_conf_example} >/etc/nginx/sites-available/${GITLAB_HOST} - ln -fs /etc/nginx/sites-available/${RET} /etc/nginx/sites-enabled/ - rm -f /tmp/gitlab-ssl + ln -fs /etc/nginx/sites-available/${GITLAB_HOST} /etc/nginx/sites-enabled/ + rm -f ${nginx_conf_example_tmp} else - echo "nginx.conf.example not found" + echo "nginx example configuration file not found" exit 1 fi else