Skip to content
Snippets Groups Projects
Commit 66f28577 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Improve bin/ launchers

parent e85faec9
No related branches found
No related tags found
No related merge requests found
Loading
@@ -32,12 +32,12 @@ restart()
Loading
@@ -32,12 +32,12 @@ restart()
   
start_no_deamonize() start_no_deamonize()
{ {
start_sidekiq start_sidekiq >> $sidekiq_logfile 2>&1
} }
   
start_sidekiq() start_sidekiq()
{ {
bundle exec sidekiq -q post_receive -q mailers -q archive_repo -q system_hook -q project_web_hook -q gitlab_shell -q incoming_email -q runner -q common -q default -e $RAILS_ENV -P $sidekiq_pidfile $@ >> $sidekiq_logfile 2>&1 bundle exec sidekiq -q post_receive -q mailers -q archive_repo -q system_hook -q project_web_hook -q gitlab_shell -q incoming_email -q runner -q common -q default -e $RAILS_ENV -P $sidekiq_pidfile "$@"
} }
   
load_ok() load_ok()
Loading
@@ -66,6 +66,9 @@ case "$1" in
Loading
@@ -66,6 +66,9 @@ case "$1" in
start_no_deamonize) start_no_deamonize)
start_no_deamonize start_no_deamonize
;; ;;
start_foreground)
start_sidekiq
;;
restart) restart)
restart restart
;; ;;
Loading
Loading
Loading
@@ -5,6 +5,7 @@ app_root=$(pwd)
Loading
@@ -5,6 +5,7 @@ app_root=$(pwd)
   
unicorn_pidfile="$app_root/tmp/pids/unicorn.pid" unicorn_pidfile="$app_root/tmp/pids/unicorn.pid"
unicorn_config="$app_root/config/unicorn.rb" unicorn_config="$app_root/config/unicorn.rb"
unicorn_cmd="bundle exec unicorn_rails -c $unicorn_config -E $RAILS_ENV"
   
get_unicorn_pid() get_unicorn_pid()
{ {
Loading
@@ -18,7 +19,12 @@ get_unicorn_pid()
Loading
@@ -18,7 +19,12 @@ get_unicorn_pid()
   
start() start()
{ {
bundle exec unicorn_rails -D -c $unicorn_config -E $RAILS_ENV $unicorn_cmd -D
}
start_foreground()
{
$unicorn_cmd
} }
   
stop() stop()
Loading
@@ -37,6 +43,9 @@ case "$1" in
Loading
@@ -37,6 +43,9 @@ case "$1" in
start) start)
start start
;; ;;
start_foreground)
start_foreground
;;
stop) stop)
stop stop
;; ;;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment