X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/ab47927c016597f8602b81dcdc168ad5c335389d..969e1e6d277ef40a24d2cdc33f31f1eaa48752f5:/cookbooks/rsyncd/recipes/default.rb diff --git a/cookbooks/rsyncd/recipes/default.rb b/cookbooks/rsyncd/recipes/default.rb index a2edd32fa..bcc0046e4 100644 --- a/cookbooks/rsyncd/recipes/default.rb +++ b/cookbooks/rsyncd/recipes/default.rb @@ -19,10 +19,13 @@ include_recipe "networking" +writable_paths = [] hosts_allow = {} hosts_deny = {} node[:rsyncd][:modules].each do |name, details| + writable_paths << details[:path] if details[:write_only] + hosts_allow[name] = details[:hosts_allow] || [] if details[:nodes_allow] @@ -45,7 +48,9 @@ package "rsync" systemd_service "rsync-override" do service "rsync" dropin "override" - exec_start "/usr/bin/rsync --daemon --no-detach --bwlimit=16384" + exec_start "/usr/bin/rsync --daemon --no-detach" + nice 10 + read_write_paths writable_paths.sort notifies :restart, "service[rsync]" end @@ -74,7 +79,7 @@ firewall_rule "accept-rsync" do action :accept source "net" dest "fw" - proto "tcp:syn" + proto "tcp" dest_ports "rsync" - source_ports "1024:" + source_ports "1024-65535" end