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
Jérome Perrin
gitlab-ce
Commits
e398e96b
Commit
e398e96b
authored
Sep 04, 2012
by
Valeriy Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1361 from tsechingho/master
use APP_ROOT in init-gitlab to specify root of project
parents
c347fd3f
457b0f60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
lib/support/init-gitlab
lib/support/init-gitlab
+8
-7
No files found.
lib/support/init-gitlab
View file @
e398e96b
...
...
@@ -9,23 +9,24 @@
# Description: GitLab git repository management
### END INIT INFO
DAEMON_OPTS
=
"-c /home/gitlab/gitlab/config/unicorn.rb -E production -D"
NAME
=
unicorn
APP_ROOT
=
"/home/gitlab/gitlab"
DAEMON_OPTS
=
"-c
$APP_ROOT
/config/unicorn.rb -E production -D"
NAME
=
"unicorn"
DESC
=
"Gitlab service"
PID
=
/home/gitlab/gitlab/tmp/pids/unicorn.pid
RESQUE_PID
=
/home/gitlab/gitlab/tmp/pids/resque_worker.pid
PID
=
"
$APP_ROOT
/tmp/pids/unicorn.pid"
RESQUE_PID
=
"
$APP_ROOT
/tmp/pids/resque_worker.pid"
case
"
$1
"
in
start
)
CD_TO_APP_DIR
=
"cd
/home/gitlab/gitlab
"
CD_TO_APP_DIR
=
"cd
$APP_ROOT
"
START_DAEMON_PROCESS
=
"bundle exec unicorn_rails
$DAEMON_OPTS
"
START_RESQUE_PROCESS
=
"./resque.sh"
echo
-n
"Starting
$DESC
: "
if
[
`
whoami
`
=
root
]
;
then
sudo
-u
gitlab sh
-l
-c
"
$CD_TO_APP_DIR
> /dev/null 2>&1
&&
$START_DAEMON_PROCESS
&&
$START_RESQUE_PROCESS
"
sudo
-u
gitlab sh
-l
-c
"
$CD_TO_APP_DIR
&&
$START_DAEMON_PROCESS
&&
$START_RESQUE_PROCESS
"
else
$CD_TO_APP_DIR
>
/dev/null 2>&1
&&
$START_DAEMON_PROCESS
&&
$START_RESQUE_PROCESS
$CD_TO_APP_DIR
&&
$START_DAEMON_PROCESS
&&
$START_RESQUE_PROCESS
fi
echo
"
$NAME
."
;;
...
...
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