File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -70,10 +70,13 @@ restart() {
70
70
cd $APP_ROOT
71
71
check_pid
72
72
if [ " $PID " -ne 0 -a " $STATUS " -ne 0 ]; then
73
- echo -n " Restarting $DESC : "
73
+ echo " Restarting $DESC ... "
74
74
kill -USR2 ` cat $UNICORN_PID `
75
- kill -USR2 ` cat $RESQUE_PID `
76
- echo " $NAME ."
75
+ kill -QUIT ` cat $RESQUE_PID `
76
+ if [ ` whoami` = root ]; then
77
+ sudo -u gitlab -H bash -l -c " mkdir -p $PID_PATH && nohup bundle exec rake environment resque:work QUEUE=post_receive,mailer,system_hook RAILS_ENV=production PIDFILE=$RESQUE_PID > /dev/null 2>&1 &"
78
+ fi
79
+ echo " $DESC restarted."
77
80
else
78
81
echo " Error, $NAME not running!"
79
82
exit 1
@@ -109,15 +112,15 @@ case "$1" in
109
112
restart
110
113
;;
111
114
reload|force-reload)
112
- echo -n " Reloading $DESC configuration: "
115
+ echo -n " Reloading $NAME configuration: "
113
116
kill -HUP ` cat $PID `
114
- echo " $NAME ."
117
+ echo " done ."
115
118
;;
116
119
status)
117
120
status
118
121
;;
119
122
* )
120
- echo " Usage: $NAME {start|stop|restart|reload}" >&2
123
+ echo " Usage: sudo service gitlab {start|stop|restart|reload}" >&2
121
124
exit 1
122
125
;;
123
126
esac
You can’t perform that action at this time.
0 commit comments