X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fportforwarder%2Ftemplates%2Fxinetd.erb;h=897924dce27434cbcbe2a09d33f7e8c3b8c3517c;hb=36da6c0d8a07c2bc140977902173170800236c67;hp=6d4f1eaca33335817c076050799eb196d97a4ba7;hpb=765ca03e0a0d81d5f19ff16a4918be7d45b2acfb;p=mirror%2Fdsa-puppet.git diff --git a/modules/portforwarder/templates/xinetd.erb b/modules/portforwarder/templates/xinetd.erb index 6d4f1eaca..897924dce 100644 --- a/modules/portforwarder/templates/xinetd.erb +++ b/modules/portforwarder/templates/xinetd.erb @@ -14,7 +14,7 @@ template = 'service @@TARGET_HOST@@@@TARGET_PORT@@ group = portforwarder instances = 10 server = /usr/bin/ssh - server_args = -o PreferredAuthentications=publickey -o EscapeChar=none -C @@TARGET_HOST@@ : nothing + server_args = -o PreferredAuthentications=publickey -o EscapeChar=none -C @@TARGET_HOST@@ forward-to @@TARGET_PORT@@ cps = 0 0 } ' @@ -26,14 +26,14 @@ if config[fqdn] target_host = service['target_host'] local_bind = service['source_bind_port'] - lines << "# to #{target_port}:target_host from local port #{local_bind}" + lines << "# to #{target_port.to_s}:target_host from local port #{local_bind.to_s}" if target_port.nil? or target_host.nil? or local_bind.nil? lines << "# insufficient config values" else p = template.clone p.gsub!('@@TARGET_HOST@@', target_host) - p.gsub!('@@TARGET_PORT@@', target_port) - p.gsub!('@@LOCLA_BIND@@', local_bind) + p.gsub!('@@TARGET_PORT@@', target_port.to_s) + p.gsub!('@@LOCAL_BIND@@', local_bind.to_s) lines << p end end