Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # /etc/init.d/resque
- #
- # init script for resque workers
- #
- #
- start() {
- echo -n "Starting resque..."
- cd /var/www/rhosyncapp1
- sudo -uwww-data QUEUE=* VERBOSE=1 /var/lib/gems/1.8/bin/rake resque:work --trace > /var/log/resque.log &
- return
- }
- stop() {
- echo -n "Shutting down resque... "
- ps -ef | grep "resque:work" | head -n1 | awk '{ print $2 }' | xargs kill
- return
- }
- case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- tart)
- echo "Usage: {start|stop|restart}"
- exit 1
- ;;
- esac
- exit $?
Advertisement
Add Comment
Please, Sign In to add comment