Sha256: 2716a026b34283feb661310958373849b6214226e71444e795173ff60513e059

Contents?: true

Size: 594 Bytes

Versions: 57

Compression:

Stored size: 594 Bytes

Contents

Standup.script :node do
  def run
    install_package 'monit'
    
    upload script_file('monitrc'),
           :to => '/etc/monit',
           :sudo => true
    upload script_file('monit'),
           :to => '/etc/default/monit',
           :sudo => true
    
    add_watch script_file('sshd.conf')
  end
  
  def add_watch file, name = File.basename(file), restart = true
    upload file,
           :to => "/etc/monit/conf.d/#{name}",
           :sudo => true
    
    sudo '/etc/init.d/monit restart' if restart
  end
  
  def restart_watch name
    sudo "monit restart #{name}"
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
standup-0.6.9 scripts/monit.rb
standup-0.6.8 scripts/monit.rb
standup-0.6.7 scripts/monit.rb
standup-0.6.6 scripts/monit.rb
standup-0.6.5 scripts/monit.rb
standup-0.6.4 scripts/monit.rb
standup-0.6.3 scripts/monit.rb
standup-0.6.2 scripts/monit.rb
standup-0.6.1 scripts/monit.rb
standup-0.6.0 scripts/monit.rb
standup-0.5.14 scripts/monit.rb
standup-0.5.13 scripts/monit.rb
standup-0.5.11 scripts/monit.rb
standup-0.5.10 scripts/monit.rb
standup-0.5.9 scripts/monit.rb
standup-0.5.8 scripts/monit.rb
standup-0.5.7 scripts/monit.rb
standup-0.5.6 scripts/monit.rb
standup-0.5.5 scripts/monit.rb
standup-0.5.4 scripts/monit.rb