sidekiq.sh 472 Bytes
Newer Older
1 2 3 4 5
#!/bin/bash
source /home/.rvm/scripts/rvm

export PUMA_APP_DIR=/portalmec

Mateus Rambo Strey's avatar
Mateus Rambo Strey committed
6 7
source $PUMA_APP_DIR/config/env_vars.sh 2>/dev/null

8 9 10 11 12
option="${1}"

case ${option} in
   start)
      cd $PUMA_APP_DIR
Mateus Rambo Strey's avatar
Mateus Rambo Strey committed
13
      exec bundle exec sidekiq
14 15 16
      ;;
   stop)
       cd $PUMA_APP_DIR
Mateus Rambo Strey's avatar
Mateus Rambo Strey committed
17
       bundle exec sidekiqctl stop shared/pids/sidekiq.pid
18 19 20 21 22 23
      ;;
   *)
      echo "`basename ${0}`:usage: [start] | [stop]"
      exit 1 # Command to come out of the program with status 1
      ;;
esac