Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A MassiveApp module and a logrotate script
- Loading branch information
Tom Copeland
committed
May 13, 2011
1 parent
656f789
commit 9fb5925
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class massiveapp { | ||
|
||
$current_path = "/home/massiveapp/current" | ||
|
||
file { | ||
"/etc/logrotate.d/massiveapp.conf": | ||
owner => root, | ||
group => root, | ||
mode => 755, | ||
content => template("massiveapp/massiveapp.logrotate.conf.erb") | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
modules/massiveapp/templates/massiveapp.logrotate.conf.erb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<%= current_path %>/log/production.log { | ||
missingok | ||
rotate 10 | ||
compress | ||
delaycompress | ||
postrotate | ||
touch <%= current_path %>/tmp/restart.txt | ||
endscript | ||
} | ||
|