diff --git a/templates/config.erb b/templates/config.erb index 619c299..0a14d43 100644 --- a/templates/config.erb +++ b/templates/config.erb @@ -2,23 +2,35 @@ <% @options.each do |opt| -%> <%= opt %> <% end -%> <% if @prerotate != 'undef' -%> - prerotate - <%= @prerotate %> - endscript + prerotate + <%- @prerotate = [@prerotate] unless @prerotate.is_a?(Array) -%> + <%- @prerotate.each do |val| -%> + <%= val %> + <%- end -%> + endscript <% end -%> <% if @postrotate != 'undef' -%> - postrotate - <%= @postrotate %> - endscript + postrotate + <%- @postrotate = [@postrotate] unless @postrotate.is_a?(Array) -%> + <%- @postrotate.each do |val| -%> + <%= val %> + <%- end -%> + endscript <% end -%> <% if @firstaction != 'undef' -%> - firstaction - <%= @firstaction %> - endscript + firstaction + <%- @firstaction = [@firstaction] unless @firstaction.is_a?(Array) -%> + <%- @firstaction.each do |val| -%> + <%= val %> + <%- end -%> + endscript <% end -%> <% if @lastaction != 'undef' -%> - lastaction - <%= @lastaction %> - endscript + lastaction + <%- @lastaction = [@lastaction] unless @lastaction.is_a?(Array) -%> + <%- @lastaction.each do |val| -%> + <%= val %> + <%- end -%> + endscript <% end -%> }