[DRE-commits] [gitlab] 17/17: use mktemp for temporary files
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Sun Feb 7 10:36:05 UTC 2016
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository gitlab.
commit 2f0f8af4e8601e89ee25f80e9300a03f356599f4
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Sun Feb 7 15:51:02 2016 +0530
use mktemp for temporary files
---
debian/postinst | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/debian/postinst b/debian/postinst
index 063ab90..7301dfe 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git
More information about the Pkg-ruby-extras-commits
mailing list