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
Boxiang Sun
gitlab-ce
Commits
29cb573b
Commit
29cb573b
authored
Dec 09, 2013
by
Rovanion Luckey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added example defaults file and appropriate documentation.
parent
dbf8ae73
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
14 deletions
+36
-14
doc/install/installation.md
doc/install/installation.md
+9
-7
lib/support/init.d/gitlab
lib/support/init.d/gitlab
+13
-7
lib/support/init.d/gitlab.default.example
lib/support/init.d/gitlab.default.example
+14
-0
No files found.
doc/install/installation.md
View file @
29cb573b
...
@@ -281,8 +281,10 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup.
...
@@ -281,8 +281,10 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup.
Download the init script (will be /etc/init.d/gitlab):
Download the init script (will be /etc/init.d/gitlab):
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo ln -s lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
sudo cp lib/support/init.d/gitlab /etc/default/gitlab
If you installed gitlab in another directory or as a user other than the default you should change these settings in /etc/default/gitlab. Do not edit /etc/init.d/gitlab as it will be changed on upgrade.
Make GitLab start on boot:
Make GitLab start on boot:
...
...
lib/support/init.d/gitlab
View file @
29cb573b
...
@@ -15,11 +15,20 @@
...
@@ -15,11 +15,20 @@
# Description: GitLab git repository management
# Description: GitLab git repository management
### END INIT INFO
### END INIT INFO
###
# DO NOT EDIT THIS FILE!
# This file will be overwritten on update.
# Instead add/change your variables in /etc/default/gitlab
# An example defaults file can be found in lib/support/default/gitlab
###
### Environment variables
### Environment variables
RAILS_ENV
=
"production"
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
# /bin/sh variables such as PATH, EDITOR or SHELL.
#
internal
/bin/sh variables such as PATH, EDITOR or SHELL.
app_user
=
"git"
app_user
=
"git"
app_root
=
"/home/
$app_user
/gitlab"
app_root
=
"/home/
$app_user
/gitlab"
pid_path
=
"
$app_root
/tmp/pids"
pid_path
=
"
$app_root
/tmp/pids"
...
@@ -27,10 +36,6 @@ socket_path="$app_root/tmp/sockets"
...
@@ -27,10 +36,6 @@ socket_path="$app_root/tmp/sockets"
web_server_pid_path
=
"
$pid_path
/unicorn.pid"
web_server_pid_path
=
"
$pid_path
/unicorn.pid"
sidekiq_pid_path
=
"
$pid_path
/sidekiq.pid"
sidekiq_pid_path
=
"
$pid_path
/sidekiq.pid"
### Here ends user configuration ###
# Read configuration variable file if it is present
# Read configuration variable file if it is present
test
-f
/etc/default/gitlab
&&
.
/etc/default/gitlab
test
-f
/etc/default/gitlab
&&
.
/etc/default/gitlab
...
@@ -39,11 +44,12 @@ if [ "$USER" != "$app_user" ]; then
...
@@ -39,11 +44,12 @@ if [ "$USER" != "$app_user" ]; then
sudo
-u
"
$app_user
"
-H
-i
$0
"
$@
"
;
exit
;
sudo
-u
"
$app_user
"
-H
-i
$0
"
$@
"
;
exit
;
fi
fi
# Switch to the gitlab path,
if it fails exit with an error
.
# Switch to the gitlab path,
exit on failure
.
if
!
cd
"
$app_root
"
;
then
if
!
cd
"
$app_root
"
;
then
echo
"Failed to cd into
$app_root
, exiting!"
;
exit
1
echo
"Failed to cd into
$app_root
, exiting!"
;
exit
1
fi
fi
### Init Script functions
### Init Script functions
## Gets the pids from the files
## Gets the pids from the files
...
...
lib/support/init.d/gitlab.default.example
0 → 100755
View file @
29cb573b
# Copy this lib/support/init.d/gitlab.default.example file to
# /etc/default/gitlab in order for it to apply to your system.
# RAILS_ENV defines the type of installation that is running.
# Normal values are "production", "test" and "development".
RAILS_ENV="production"
# app_user defines the user that GitLab is run as.
# The default is "git".
app_user="git"
# app_root defines the folder in which gitlab and it's components are installed.
# The default is "/home/$app_user/gitlab"
app_root="/home/$app_user/gitlab"
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