File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 14
14
# Description: GitLab git repository management
15
15
# ## END INIT INFO
16
16
17
-
18
- APP_ROOT=" /home/gitlab_ci /gitlab-ci"
17
+ USER= " gitlab_ci "
18
+ APP_ROOT=" /home/$USER /gitlab-ci"
19
19
DAEMON_OPTS=" -p 3000 -d -e production"
20
20
PID_PATH=" $APP_ROOT /tmp/pids"
21
21
THIN_PID=" $PID_PATH /thin.pid"
@@ -42,8 +42,8 @@ start() {
42
42
exit 1
43
43
else
44
44
if [ ` whoami` = root ]; then
45
- sudo -u gitlab_ci -H sh -l -c " nohup bundle exec thin start $DAEMON_OPTS > /dev/null 2>&1 &"
46
- sudo -u gitlab_ci -H sh -l -c " mkdir -p $PID_PATH && nohup bundle exec rake environment resque:work QUEUE=runner RAILS_ENV=production PIDFILE=$RESQUE_PID > /dev/null 2>&1 &"
45
+ sudo -u $USER -H sh -l -c " nohup bundle exec thin start $DAEMON_OPTS > /dev/null 2>&1 &"
46
+ sudo -u $USER -H sh -l -c " mkdir -p $PID_PATH && nohup bundle exec rake environment resque:work QUEUE=runner RAILS_ENV=production PIDFILE=$RESQUE_PID > /dev/null 2>&1 &"
47
47
echo " $DESC started"
48
48
fi
49
49
fi
You can’t perform that action at this time.
0 commit comments