configure hostname and email
This commit is contained in:
parent
31e23343a4
commit
e77afc3a96
1 changed files with 14 additions and 23 deletions
37
debian/postinst
vendored
37
debian/postinst
vendored
|
@ -47,6 +47,19 @@ case "$1" in
|
||||||
su ${gitlab_user} -s /bin/sh -c "mkdir -p -m 750 ${gitlab_home}/public/uploads"
|
su ${gitlab_user} -s /bin/sh -c "mkdir -p -m 750 ${gitlab_home}/public/uploads"
|
||||||
su ${gitlab_user} -s /bin/sh -c 'git config --global core.autocrlf "input"'
|
su ${gitlab_user} -s /bin/sh -c 'git config --global core.autocrlf "input"'
|
||||||
cd ${gitlab_home}
|
cd ${gitlab_home}
|
||||||
|
db_get gitlab/fqdn
|
||||||
|
if [ "${RET}" = "true" ]; then
|
||||||
|
db_go
|
||||||
|
if ! grep GITLAB_HOST /etc/gitlab/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
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
db_stop
|
||||||
|
|
||||||
echo "Create database if not present"
|
echo "Create database if not present"
|
||||||
if ! su postgres -s /bin/sh -c "psql gitlab_production -c ''"
|
if ! su postgres -s /bin/sh -c "psql gitlab_production -c ''"
|
||||||
then
|
then
|
||||||
|
@ -63,29 +76,7 @@ case "$1" in
|
||||||
# Move these to rails-common
|
# Move these to rails-common
|
||||||
. /usr/lib/gitlab/scripts/rake-tasks.sh
|
. /usr/lib/gitlab/scripts/rake-tasks.sh
|
||||||
|
|
||||||
# Get ssl choice
|
|
||||||
db_get gitlab/ssl
|
|
||||||
if [ "${RET}" = "true" ]; then
|
|
||||||
db_go
|
|
||||||
# Configure instance address.
|
|
||||||
db_get gitlab/fqdn
|
|
||||||
echo "SSL enabled, configuring nginx for ${RET}..."
|
|
||||||
#/usr/lib/diaspora-common/scripts/set-env-nginx.sh ${RET}
|
|
||||||
db_go
|
|
||||||
else
|
|
||||||
db_go
|
|
||||||
# Configure instance address.
|
|
||||||
db_get gitlab/fqdn
|
|
||||||
echo "SSL disabled, skip nginx configuration for ${RET}..."
|
|
||||||
#if ! grep SERVERNAME /etc/diaspora.conf
|
|
||||||
#then
|
|
||||||
# echo export SERVERNAME=${RET} >> /etc/diaspora.conf
|
|
||||||
# export SERVERNAME=${RET}
|
|
||||||
# echo export ENVIRONMENT_URL="http://$SERVERNAME:3000" >> /etc/diaspora.conf
|
|
||||||
#fi
|
|
||||||
fi
|
|
||||||
db_stop
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
|
Loading…
Reference in a new issue