From cc11e5314112f5c34f10a0dd97fa03a470b276a4 Mon Sep 17 00:00:00 2001 From: Praveen Arimbrathodiyil Date: Thu, 4 Feb 2016 15:33:53 +0530 Subject: [PATCH] make gitlab starting conditional (systemd or sysv) --- debian/rake-tasks.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/rake-tasks.sh b/debian/rake-tasks.sh index 12ec416f88..399888d99c 100755 --- a/debian/rake-tasks.sh +++ b/debian/rake-tasks.sh @@ -14,7 +14,12 @@ echo "Precompiling assets..." su ${gitlab_user} -s /bin/sh -c 'bundle exec rake assets:precompile RAILS_ENV=production' # Start gitlab -invoke-rc.d gitlab start +if grep systemd /proc/cmdline +then + systemctl start gitlab.target +else + invoke-rc.d gitlab start +fi # Check gitlab is configured correctly su ${gitlab_user} -s /bin/sh -c 'bundle exec rake gitlab:check RAILS_ENV=production'