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.3.20 scripts/monit.rb
standup-0.3.19 scripts/monit.rb
standup-0.3.18 scripts/monit.rb
standup-0.3.17 scripts/monit.rb
standup-0.3.16 scripts/monit.rb
standup-0.3.15 scripts/monit.rb
standup-0.3.14 scripts/monit.rb
standup-0.3.13 scripts/monit.rb
standup-0.3.12 scripts/monit.rb
standup-0.3.11 scripts/monit.rb
standup-0.3.10 scripts/monit.rb
standup-0.3.9 scripts/monit.rb
standup-0.3.8 scripts/monit.rb
standup-0.3.7 scripts/monit.rb
standup-0.3.6 scripts/monit.rb
standup-0.3.5 scripts/monit.rb
standup-0.3.4 scripts/monit.rb