<% @path = "/etc/init/resque-web.conf" @backup = false %> description "resque web server" start on started redis stop on runlevel [016] script exec sudo -u <%= rubber_env.app_user %> /bin/bash -l -c 'cd <%= Rubber.root %> && exec bundle exec resque-web --foreground --port <%= rubber_env.resque_web_port %> --no-launch --app-dir tmp/resque_web config/initializers/resque.rb > log/resque-web.log 2>&1' end script post-start script status resque-web | head -n1 | awk '{print $NF}' > <%= rubber_env.resque_web_pid_file %> end script post-stop script rm -f <%= rubber_env.resque_web_pid_file %> end script