Skip to content

Instantly share code, notes, and snippets.

@ijonas
Created December 1, 2014 09:57
Show Gist options
  • Save ijonas/263eaf67cdb93ed94767 to your computer and use it in GitHub Desktop.
Save ijonas/263eaf67cdb93ed94767 to your computer and use it in GitHub Desktop.
Quick & dirty Ruby script to generate a whole bunch of logrotate conf files.
#! /usr/bin/env ruby
# license: MIT
# example usage: ./logrotateconf $PWD/newrelic_agent.log > newrelic_agent
conf = <<-eos
{
rotate 14
daily
missingok
create 640 ubuntu ubuntu
notifempty
compress
delaycompress
}
eos
puts ARGV.first + conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment