... @@ -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
...
...
... ...