make gitlab starting conditional (systemd or sysv)

This commit is contained in:
Praveen Arimbrathodiyil 2016-02-04 15:33:53 +05:30
parent 0b05de1029
commit cc11e53141

View file

@ -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'