#!/bin/bash
# Stop sidekiq

my_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $my_dir/check_app_root

pidfile=$APP_ROOT/tmp/pids/sidekiq.pid

echo -n "Killing sidekiq ... "

if [ -e "$pidfile" ] ; then
  kill -TERM `cat $pidfile`
  sleep 1
  rm -f $pidfile
  echo "done."
else
  echo "was not running."
fi

