[DRE-commits] [gitlab] 01/03: check for .secret existence before creating

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Thu Feb 18 13:57:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository gitlab.

commit ae820c4aebb2c706f7e987ba3db03ed88fbc38aa
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Thu Feb 18 19:04:50 2016 +0530

    check for .secret existence before creating
---
 debian/postinst | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index 7cd9a4f..d77b231 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -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'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git



More information about the Pkg-ruby-extras-commits mailing list