Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here is the template:
- <%= @log_path -%> {
- <%= @rotate_every %>
- rotate <%= @rotate_count %>
- compress
- <% if @delaycompress == true %>delaycompress
- <% end -%>missingok
- notifempty
- create <%= @create_mode -%> <%= @create_owner -%> <%= @create_group %>
- <% if @postrotate == true -%>postrotate
- <% @postrotate_cmd.each do |value| -%><%= value %>
- <% end -%>endscript<% end -%>
- }
- When @postrotate is false the output looks like this. The `}` isn't to the left.
- /var/log/auth.log {
- weekly
- rotate 4
- compress
- delaycompress
- missingok
- notifempty
- create 0644 root adm
- }
- When @postrotate is true the output looks like this. The second `invoke commnad` should be a bit to the right and `}` should be on the new line to the left.
- /var/log/auth.log {
- weekly
- rotate 4
- compress
- delaycompress
- missingok
- notifempty
- create 0644 root adm
- postrotate
- invoke-rc.d rsyslog reload > /dev/null
- invoke-rc.d rsyslog reload > /dev/null
- endscript}
- Expected output when @postrotate is false:
- /var/log/auth.log {
- weekly
- rotate 4
- compress
- delaycompress
- missingok
- notifempty
- create 0644 root adm
- }
- Expected output when @postrotate is true:
- /var/log/auth.log {
- weekly
- rotate 4
- compress
- delaycompress
- missingok
- notifempty
- create 0644 root adm
- postrotate
- invoke-rc.d rsyslog reload > /dev/null
- invoke-rc.d rsyslog reload > /dev/null
- endscript
- }
Add Comment
Please, Sign In to add comment