check if nginx site dir exist
This commit is contained in:
parent
7767f90971
commit
9d6cc9736b
1 changed files with 14 additions and 11 deletions
25
debian/postinst
vendored
25
debian/postinst
vendored
|
@ -151,17 +151,20 @@ EOF
|
||||||
ucf --debconf-ok --three-way ${gitlab_debian_conf_private} ${gitlab_debian_conf}
|
ucf --debconf-ok --three-way ${gitlab_debian_conf_private} ${gitlab_debian_conf}
|
||||||
ucfr gitlab ${gitlab_debian_conf}
|
ucfr gitlab ${gitlab_debian_conf}
|
||||||
|
|
||||||
if test -f ${nginx_conf_example}; then
|
# configure nginx site
|
||||||
nginx_site="/etc/nginx/sites-available/${GITLAB_HOST}"
|
if test -d /etc/nginx/sites-available/; then
|
||||||
sed -e "s/YOUR_SERVER_FQDN/${GITLAB_HOST}/"\
|
if test -f ${nginx_conf_example}; then
|
||||||
${nginx_conf_example} >${nginx_site_private}
|
nginx_site="/etc/nginx/sites-available/${GITLAB_HOST}"
|
||||||
ucf --debconf-ok --three-way ${nginx_site_private} ${nginx_site}
|
sed -e "s/YOUR_SERVER_FQDN/${GITLAB_HOST}/"\
|
||||||
ucfr gitlab ${nginx_site}
|
${nginx_conf_example} >${nginx_site_private}
|
||||||
ln -fs ${nginx_site} /etc/nginx/sites-enabled/
|
ucf --debconf-ok --three-way ${nginx_site_private} ${nginx_site}
|
||||||
rm -f ${nginx_conf_example_tmp}
|
ucfr gitlab ${nginx_site}
|
||||||
else
|
ln -fs ${nginx_site} /etc/nginx/sites-enabled/
|
||||||
echo "nginx example configuration file not found"
|
rm -f ${nginx_conf_example_tmp}
|
||||||
exit 1
|
else
|
||||||
|
echo "nginx example configuration file not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# Reload nginx
|
# Reload nginx
|
||||||
if command -v nginx > /dev/null; then
|
if command -v nginx > /dev/null; then
|
||||||
|
|
Loading…
Reference in a new issue