check for .secret existence before creating
This commit is contained in:
parent
2e61a668a2
commit
ae820c4aeb
1 changed files with 5 additions and 2 deletions
5
debian/postinst
vendored
5
debian/postinst
vendored
|
@ -134,9 +134,12 @@ case "$1" in
|
||||||
|
|
||||||
# Create Gemfile.lock and .secret in /var/lib/gitlab
|
# Create Gemfile.lock and .secret in /var/lib/gitlab
|
||||||
su ${gitlab_user} -s /bin/sh -c "touch ${gitlab_data_dir}/Gemfile.lock"
|
su ${gitlab_user} -s /bin/sh -c "touch ${gitlab_data_dir}/Gemfile.lock"
|
||||||
su ${gitlab_user} -s /bin/sh -c "touch ${gitlab_data_dir}/.secret"
|
|
||||||
ln -s ${gitlab_data_dir}/Gemfile.lock ${gitlab_app_root}/Gemfile.lock
|
ln -s ${gitlab_data_dir}/Gemfile.lock ${gitlab_app_root}/Gemfile.lock
|
||||||
|
|
||||||
|
if ! [ -f "${gitlab_app_root}" ]; then
|
||||||
|
su ${gitlab_user} -s /bin/sh -c "touch ${gitlab_data_dir}/.secret"
|
||||||
ln -s ${gitlab_data_dir}/.secret ${gitlab_app_root}/.secret
|
ln -s ${gitlab_data_dir}/.secret ${gitlab_app_root}/.secret
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Verifying we have all required libraries..."
|
echo "Verifying we have all required libraries..."
|
||||||
su ${gitlab_user} -s /bin/sh -c 'bundle install --local'
|
su ${gitlab_user} -s /bin/sh -c 'bundle install --local'
|
||||||
|
|
Loading…
Reference in a new issue