oysters 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/oysters/initd/logrotate.rb +10 -1
- data/lib/oysters/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e343f61b542b2a65c0ff4ce43dd48193f067ab47
|
4
|
+
data.tar.gz: 27438e12218629c900e5dfb5b66593ab68b3ade2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e991e520ae5d6b6c58edfb4affb6fe1549f551727deed9b646bc06e0084ecc0c1b493f67489c09af7133f1c6af82340b6e6828015f4f8c90e6f9c8b79a7abe7d
|
7
|
+
data.tar.gz: a7bf6bf47f548dd087fbe84065afda6f1df73826477f0210c76c0033e1fb6ba24693573da71d56411b0998e08ffb7b93003fd71a897eafeda72f420b967aec16
|
@@ -7,8 +7,17 @@ Oysters.with_configuration do
|
|
7
7
|
namespace :logrotate do
|
8
8
|
desc 'Install logrotate config'
|
9
9
|
task :install, roles: :app do
|
10
|
+
environment = Rails.env
|
11
|
+
log_path = [ Pathname.new(shared_path).join('log', "#{environment}.log").to_s ]
|
12
|
+
|
13
|
+
if application == 'oiv-ui'
|
14
|
+
%W(#{environment}_delayed_job.log #{environment}_security_audit.log unicorn_#{environment}.stderr.log).each do |log|
|
15
|
+
log_path << Pathname.new(shared_path).join('log', log).to_s
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
10
19
|
conf_path = "/etc/logrotate.d/#{application}_logs"
|
11
|
-
log_path =
|
20
|
+
log_path = log_path.join(' ')
|
12
21
|
tmp_file = "/tmp/#{application}_logs_#{rand}"
|
13
22
|
location = File.expand_path('../../templates/logrotate_config.erb', __FILE__)
|
14
23
|
config = ERB.new(File.read(location))
|
data/lib/oysters/version.rb
CHANGED