citrin 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/citrin.gemspec +1 -1
- data/lib/citrin/commands/setup_logrotate.rb +4 -2
- metadata +1 -1
data/citrin.gemspec
CHANGED
@@ -8,8 +8,10 @@ module Commands
|
|
8
8
|
template_file = logrotate_config_template(@app)
|
9
9
|
template = ERB.new(File.read(template_file), 0, "%<>")
|
10
10
|
result = template.result(binding)
|
11
|
-
|
12
|
-
|
11
|
+
output_file = "/etc/logrotate.d/rails-app-#{@app.name}"
|
12
|
+
puts "Creating logrotate config file at #{output_file}"
|
13
|
+
puts result
|
14
|
+
`sudo sh -c 'echo "#{result}" > #{output_file}'`
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|