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() {
7070 cd $APP_ROOT
7171 check_pid
7272 if [ " $PID " -ne 0 -a " $STATUS " -ne 0 ]; then
73- echo -n " Restarting $DESC : "
73+ echo " Restarting $DESC ... "
7474 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."
7780 else
7881 echo " Error, $NAME not running!"
7982 exit 1
@@ -109,15 +112,15 @@ case "$1" in
109112 restart
110113 ;;
111114 reload|force-reload)
112- echo -n " Reloading $DESC configuration: "
115+ echo -n " Reloading $NAME configuration: "
113116 kill -HUP ` cat $PID `
114- echo " $NAME ."
117+ echo " done ."
115118 ;;
116119 status)
117120 status
118121 ;;
119122 * )
120- echo " Usage: $NAME {start|stop|restart|reload}" >&2
123+ echo " Usage: sudo service gitlab {start|stop|restart|reload}" >&2
121124 exit 1
122125 ;;
123126esac
You can’t perform that action at this time.
0 commit comments