Skip to content

Instantly share code, notes, and snippets.

@andmarios andmarios/gitlab
Created Jul 8, 2013

Embed
What would you like to do?
Gentoo init script for Gitlab versions 5.2 and 5.3
#!/sbin/runscript
# GitLab 5.2 and 5.3 init script for Gentoo Linux
# see https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md
GITLAB_BASE=/home/git/gitlab
GITLAB_USER=git
depend() {
need net redis
}
start() {
ebegin "Starting gitlab puma server"
[[ -d ${GITLAB_BASE}/tmp/pids ]] || su $GITLAB_USER -c "mkdir -p ${GITLAB_BASE}/tmp/pids"
start-stop-daemon --start \
--chdir "${GITLAB_BASE}" \
--user "${GITLAB_USER}" \
--pidfile "${GITLAB_BASE}/tmp/pids/puma.pid" \
--exec bundle -- exec puma -C config/puma.rb -e production
eend $?
ebegin "Starting gitlab sidekiq"
start-stop-daemon --start \
--chdir "${GITLAB_BASE}" \
--user "${GITLAB_USER}" \
--pidfile "${GITLAB_BASE}/tmp/pids/sidekiq.pid" \
--exec bundle -- exec rake sidekiq:start RAILS_ENV=production
eend $?
}
stop() {
ebegin "Stopping gitlab sidekiq"
start-stop-daemon --stop \
--chdir "${GITLAB_BASE}" \
--user "${GITLAB_USER}" \
--pidfile "${GITLAB_BASE}/tmp/pids/sidekiq.pid"
eend $?
ebegin "Stopping gitlab unicorn server"
start-stop-daemon --stop \
--chdir "${GITLAB_BASE}" \
--user "${GITLAB_USER}" \
--pidfile "${GITLAB_BASE}/tmp/pids/puma.pid"
eend $?
}
@limansky

This comment has been minimized.

Copy link

commented Aug 24, 2013

Hi! If you need the script for 6-0 I have one based on your: https://gist.github.com/limansky/6330226

@666threesixes666

This comment has been minimized.

Copy link

commented Aug 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.