check for .secret existence before creating

This commit is contained in:
Praveen Arimbrathodiyil 2016-02-18 19:04:50 +05:30
parent 2e61a668a2
commit ae820c4aeb

7
debian/postinst vendored
View file

@ -134,9 +134,12 @@ case "$1" in
# 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}/.secret"
ln -s ${gitlab_data_dir}/Gemfile.lock ${gitlab_app_root}/Gemfile.lock
ln -s ${gitlab_data_dir}/.secret ${gitlab_app_root}/.secret
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
fi
echo "Verifying we have all required libraries..."
su ${gitlab_user} -s /bin/sh -c 'bundle install --local'