Permalink
Browse files

Merge pull request #43 from yourabi/master

making ssh port configurable
  • Loading branch information...
2 parents 6d3eb12 + 1e13f06 commit c2bd30fcdd1bd0b83402d67774ecc2d594f69649 @yourabi yourabi committed Dec 5, 2013
Showing with 2 additions and 1 deletion.
  1. +1 −0 attributes/default.rb
  2. +1 −1 templates/default/ssh.conf.erb
View
1 attributes/default.rb
@@ -28,3 +28,4 @@
default[:monit][:allow] = ["localhost"]
default[:monit][:username] = nil
default[:monit][:password] = nil
+default[:monit][:ssh_port] = 22
View
2 templates/default/ssh.conf.erb
@@ -3,5 +3,5 @@ CHECK PROCESS sshd WITH PIDFILE /var/run/sshd.pid
START PROGRAM "/usr/sbin/service ssh start"
STOP PROGRAM "/usr/sbin/service ssh stop"
# under load a check may fail intermittently, so give it a few tries before restarting
- IF FAILED PORT 22 PROTOCOL ssh 4 TIMES WITHIN 6 CYCLES THEN RESTART
+ IF FAILED PORT <%= @node[:monit][:ssh_port] %> PROTOCOL ssh 4 TIMES WITHIN 6 CYCLES THEN RESTART

0 comments on commit c2bd30f

Please sign in to comment.