Created
April 11, 2012 16:36
-
-
Save int128/2360407 to your computer and use it in GitHub Desktop.
GitLab init script for Gentoo Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/runscript | |
# GitLab init script for Gentoo Linux | |
# see https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md | |
GITLAB_BASE=/home/gitlab/gitlab | |
GITLAB_USER=gitlab | |
depend() { | |
need net mysql redis | |
} | |
start() { | |
ebegin "Starting gitlab unicorn server" | |
start-stop-daemon --start \ | |
--chdir "${GITLAB_BASE}" \ | |
--user "${GITLAB_USER}" \ | |
--pidfile "${GITLAB_BASE}/tmp/pids/unicorn.pid" \ | |
--exec bundle -- exec unicorn_rails -c "${GITLAB_BASE}/config/unicorn.rb" -E production -D | |
eend $? | |
ebegin "Starting gitlab resque" | |
start-stop-daemon --start \ | |
--chdir "${GITLAB_BASE}" \ | |
--user "${GITLAB_USER}" \ | |
--pidfile "${GITLAB_BASE}/tmp/pids/resque_worker.pid" \ | |
--exec "${GITLAB_BASE}/resque.sh" | |
eend $? | |
} | |
stop() { | |
ebegin "Stopping gitlab resque" | |
start-stop-daemon --stop \ | |
--chdir "${GITLAB_BASE}" \ | |
--user "${GITLAB_USER}" \ | |
--pidfile "${GITLAB_BASE}/tmp/pids/resque_worker.pid" | |
eend $? | |
ebegin "Stopping gitlab unicorn server" | |
start-stop-daemon --stop \ | |
--chdir "${GITLAB_BASE}" \ | |
--user "${GITLAB_USER}" \ | |
--pidfile "${GITLAB_BASE}/tmp/pids/unicorn.pid" | |
eend $? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Many thanks, great work!