configure nginx
This commit is contained in:
parent
8312c51259
commit
e57c0f6ce7
3 changed files with 20 additions and 6 deletions
debian
1
debian/conf/gitlab-debian.conf
vendored
1
debian/conf/gitlab-debian.conf
vendored
|
@ -9,3 +9,4 @@ export gitlab_nginx_log=/var/log/gitlab
|
|||
export gitlab_ssl_path=/etc/gitlab/ssl
|
||||
export gitlab_shell_root=/usr/share/gitlab-shell
|
||||
export gitlab_shell_log=/var/log/gitlab-shell
|
||||
export nginx_conf_example=/usr/share/doc/gitlab/nginx.conf.example
|
||||
|
|
1
debian/gitlab.docs
vendored
1
debian/gitlab.docs
vendored
|
@ -1,2 +1,3 @@
|
|||
README.md
|
||||
debian/README.Debian
|
||||
debian/conf/nginx.conf.example
|
||||
|
|
24
debian/postinst
vendored
24
debian/postinst
vendored
|
@ -31,7 +31,8 @@ case "$1" in
|
|||
# Show debconf questions
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
. /etc/gitlab/gitlab-debian.conf
|
||||
gitlab_debian_conf=/etc/gitlab/gitlab-debian.conf
|
||||
. ${gitlab_debian_conf}
|
||||
. /usr/lib/gitlab/scripts/adduser.sh
|
||||
gitlab_repo_path=${gitlab_data_dir}/repositories
|
||||
mkdir -p ${gitlab_repo_path}
|
||||
|
@ -50,13 +51,24 @@ case "$1" in
|
|||
db_get gitlab/fqdn
|
||||
if [ "${RET}" != "" ]; then
|
||||
db_go
|
||||
if ! grep GITLAB_HOST /etc/gitlab/gitlab-debian.conf
|
||||
if ! grep GITLAB_HOST ${gitlab_debian_conf}
|
||||
then
|
||||
echo export GITLAB_HOST=${RET} >> /etc/gitlab/gitlab-debian.conf
|
||||
echo export GITLAB_EMAIL_FROM="no-reply@${RET}" >> /etc/gitlab/gitlab-debian.conf
|
||||
echo export GITLAB_EMAIL_DISPLAY_NAME="Gitlab" >> /etc/gitlab/gitlab-debian.conf
|
||||
echo export GITLAB_EMAIL_REPLY_TO="no-reply@${RET}" >> /etc/gitlab/gitlab-debian.conf
|
||||
echo export GITLAB_HOST=${RET} >> ${gitlab_debian_conf}
|
||||
echo export GITLAB_EMAIL_FROM="no-reply@${RET}" >> ${gitlab_debian_conf}
|
||||
echo export GITLAB_EMAIL_DISPLAY_NAME="Gitlab" >> ${gitlab_debian_conf}
|
||||
echo export GITLAB_EMAIL_REPLY_TO="no-reply@${RET}" >> ${gitlab_debian_conf}
|
||||
fi
|
||||
|
||||
if test -f ${nginx_conf_example}
|
||||
then
|
||||
sed -e "s/YOUR_SERVER_FQDN/${RET}/"\
|
||||
${nginx_conf_example} >/etc/nginx/sites-available/${RET}
|
||||
ln -fs /etc/nginx/sites-available/${RET} /etc/nginx/sites-enabled/
|
||||
else
|
||||
echo "nginx.conf.example not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Failed to retrieve fully qualified domain name"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Reference in a new issue