Skip to content

Instantly share code, notes, and snippets.

@statik
Created September 25, 2012 16:56
Show Gist options
  • Save statik/3783125 to your computer and use it in GitHub Desktop.
Save statik/3783125 to your computer and use it in GitHub Desktop.
reload sshd after config changes
diff --git a/cookbooks/openssh/recipes/default.rb b/cookbooks/openssh/recipes/default.rb
index 7fbf435..94b35b7 100644
--- a/cookbooks/openssh/recipes/default.rb
+++ b/cookbooks/openssh/recipes/default.rb
@@ -44,6 +44,7 @@ template "/etc/ssh/sshd_config" do
owner 'root'
group 'root'
variables(:settings => node['openssh']['server'])
+ notifies :reload, resources(:service => "ssh"), :immediate
end
service "ssh" do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment