Sha256: 2ba692fe677601673c2080c097cddb88d29dcf8a486aa38e6f06a284bc34b790
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
#! /bin/sh ### BEGIN INIT INFO # Provides: delayed_job # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Manage delayed jobs for application <%= fetch(:application) %> , environment <%= fetch(:rails_env) %> # Description: Start, stop, restart delayed jobs for application <%= fetch(:application) %>, environment <%= fetch(:rails_env) %> ### END INIT INFO N=/etc/init.d/delayed_job AS_USER=<%= fetch(:delayed_job_user) %> service="delayed_job" set -e interact() { op="$1" echo "Invoking DelayedJob with command '$op'" CMD="<%= delayed_job_command("$op -n", fetch(:delayed_job_workers))%>" if [ "$(id -un)" = "$AS_USER" ]; then eval $CMD else su -c "$CMD" - $AS_USER fi } case "$1" in start|stop) interact "$1" ;; reload|restart|force-reload) interact "stop" sleep 1s interact "start" ;; *) usage ;; esac exit 0
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capistrano-delayed-job-1.1.0 | lib/generators/capistrano/delayed_job/templates/delayed_job_init.erb |