sidekiq.sh 409 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/bin/bash
source /home/.rvm/scripts/rvm

export PUMA_APP_DIR=/portalmec

option="${1}"

case ${option} in
   start)
      cd $PUMA_APP_DIR
      bundle exec sidekiq
      ;;
   stop)
       cd $PUMA_APP_DIR
       bundle exec sidekiqctl shared/pids/sidekiq.pid
      ;;
   *)
      echo "`basename ${0}`:usage: [start] | [stop]"
      exit 1 # Command to come out of the program with status 1
      ;;
esac