Created
December 27, 2013 23:04
-
-
Save hiremaga/8153874 to your computer and use it in GitHub Desktop.
Just an idea...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Job.describe("gorouter") do |job| | |
job.command = "bin/router -c /var/vcap/jobs/gorouter/config/gorouter.yml" | |
job.templates << "templates/gorouter.yml.erb", "config/gorouter.yml" | |
job.templates << "templates/logrotate.conf.erb", "config/logrotate.conf" | |
job.templates << "templates/syslog_forwarder.conf.erb", "config/syslog_forwarder.conf" | |
freq_min = job.properties.router && job.properties.router.logrotate && job.properties.router.logrotate.freq_min || 5 | |
job.cron "*/#{freq_min} * * * * test -x /usr/sbin/logrotate && /usr/sbin/logrotate #{job.job_root}/config/logrotate.conf >> #{job.log_root}/gorouter_logrotate_cron.log 2>&1" | |
job.additional_packages << "common" | |
job.additional_packages << "syslog_aggregator" | |
job.dependencies << "golang" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment