Sha256: 9d25f67af9a313be32c3433660405ae28207593f526fa8a0c26eef45d4af0bef

Contents?: true

Size: 718 Bytes

Versions: 1

Compression:

Stored size: 718 Bytes

Contents

namespace :sshd do
  
  namespace :monit do
    
    desc <<-DESC
    Install sshd monit hooks.
  
    *sshd_port*: SSH daemon port. _Defaults to 22\n
    *sshd_pid_path*: Path to mysql pid file. _Defaults to /var/run/sshd.pid_\n
    *monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_\n
    DESC
    task :install do
    
      # Settings 
      fetch_or_default(:sshd_port, 3306)   
      fetch_or_default(:sshd_pid_path, "/var/run/sshd.pid")      
      fetch_or_default(:monit_conf_dir, "/etc/monit") 
    
      put template.load("sshd/sshd.monitrc.erb", binding), "/tmp/sshd.monitrc"    
      run_via "install -o root /tmp/sshd.monitrc #{monit_conf_dir}/sshd.monitrc"
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capitate-0.2.8 lib/recipes/sshd.rb