Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
f57944cc
Commit
f57944cc
authored
Aug 28, 2013
by
Rovanion
Committed by
Rovanion Luckey
Aug 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrections suggested by jacobvosmaer
parent
7c38f4e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
lib/support/init.d/gitlab
lib/support/init.d/gitlab
+15
-8
No files found.
lib/support/init.d/gitlab
View file @
f57944cc
...
@@ -20,8 +20,8 @@ RAILS_ENV="production"
...
@@ -20,8 +20,8 @@ RAILS_ENV="production"
# Script variable names should be lower-case not to conflict with internal
# Script variable names should be lower-case not to conflict with internal
# /bin/sh variables such as PATH, EDITOR or SHELL.
# /bin/sh variables such as PATH, EDITOR or SHELL.
app_root
=
"/home/git/gitlab"
app_root
=
"/home/git
lab
/gitlab"
app_user
=
"git"
app_user
=
"git
lab
"
unicorn_conf
=
"
$app_root
/config/unicorn.rb"
unicorn_conf
=
"
$app_root
/config/unicorn.rb"
pid_path
=
"
$app_root
/tmp/pids"
pid_path
=
"
$app_root
/tmp/pids"
socket_path
=
"
$app_root
/tmp/sockets"
socket_path
=
"
$app_root
/tmp/sockets"
...
@@ -99,7 +99,7 @@ check_stale_pids(){
...
@@ -99,7 +99,7 @@ check_stale_pids(){
}
}
# If no parts of the service is running, bail out.
# If no parts of the service is running, bail out.
check
_not_running
(){
exit_if
_not_running
(){
check_stale_pids
check_stale_pids
if
[
"
$web_status
"
!=
"0"
-a
"
$sidekiq_status
"
!=
"0"
]
;
then
if
[
"
$web_status
"
!=
"0"
-a
"
$sidekiq_status
"
!=
"0"
]
;
then
echo
"GitLab is not running."
echo
"GitLab is not running."
...
@@ -138,7 +138,7 @@ start() {
...
@@ -138,7 +138,7 @@ start() {
# Asks the Unicorn and the Sidekiq if they would be so kind as to stop, if not kills them.
# Asks the Unicorn and the Sidekiq if they would be so kind as to stop, if not kills them.
stop
()
{
stop
()
{
check
_not_running
exit_if
_not_running
# If the Unicorn web server is running, tell it to stop;
# If the Unicorn web server is running, tell it to stop;
if
[
"
$web_status
"
=
"0"
]
;
then
if
[
"
$web_status
"
=
"0"
]
;
then
kill
-QUIT
"
$wpid
"
&
kill
-QUIT
"
$wpid
"
&
...
@@ -178,7 +178,7 @@ stop() {
...
@@ -178,7 +178,7 @@ stop() {
# Returns the status of GitLab and it's components
# Returns the status of GitLab and it's components
status
()
{
status
()
{
check
_not_running
exit_if
_not_running
if
[
"
$web_status
"
=
"0"
]
;
then
if
[
"
$web_status
"
=
"0"
]
;
then
echo
"The GitLab Unicorn webserver with pid
$wpid
is running."
echo
"The GitLab Unicorn webserver with pid
$wpid
is running."
else
else
...
@@ -195,14 +195,21 @@ status() {
...
@@ -195,14 +195,21 @@ status() {
}
}
reload
(){
reload
(){
check
_not_running
exit_if
_not_running
if
[
"
$wpid
"
=
"0"
]
;
then
if
[
"
$wpid
"
=
"0"
]
;
then
echo
"The GitLab Unicorn Web server is not running thus it's configuration can't be reloaded."
echo
"The GitLab Unicorn Web server is not running thus it's configuration can't be reloaded."
exit
1
exit
1
fi
fi
printf
"Reloading GitLab configuration... "
printf
"Reloading GitLab
Unicorn
configuration... "
kill
-
HUP
"
$wpid
"
kill
-
USR2
"
$wpid
"
echo
"Done."
echo
"Done."
echo
"Restarting GitLab Sidekiq since it isn't capable of reloading it's config..."
RAILS_ENV
=
$RAILS_ENV
bundle
exec
rake sidekiq:stop
echo
"Starting Sidekiq..."
RAILS_ENV
=
$RAILS_ENV
bundle
exec
rake sidekiq:start
# Waiting 2 seconds for sidekiq to write it.
sleep
2
status
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment