Sha256: 32dd2e7c8fed930e6998e5ff2171926b8bbde24967339c13d9d010578f69db9a

Contents?: true

Size: 746 Bytes

Versions: 4

Compression:

Stored size: 746 Bytes

Contents

Standup.script :node do
  def run
    scripts.redis.install_from_resque if  sudo('find /etc/init.d/redis-server').match(/No such file or directory/).present?

    path_to_resque_exec = "#{scripts.webapp.app_path}/script/resque"
    upload script_file('resque'),
           :to => path_to_resque_exec,
           :sudo => true
    sudo "chown www-data:www-data #{path_to_resque_exec}"
    sudo "chmod +x #{path_to_resque_exec}"

    sudo "mkdir #{scripts.webapp.app_path}/tmp/pids"
    sudo "chown www-data:www-data #{scripts.webapp.app_path}/tmp/pids"
    with_processed_file script_file('resque_monit.conf') do |file|
      scripts.monit.add_watch file
    end

    restart
  end

  def restart
    scripts.monit.restart_watch 'resque'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
standup-0.3.29 scripts/resque.rb
standup-0.3.28 scripts/resque.rb
standup-0.3.27 scripts/resque.rb
standup-0.3.26 scripts/resque.rb