recipiez 0.6.23 → 0.6.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Recipiez
2
- VERSION = '0.6.23'
2
+ VERSION = '0.6.24'
3
3
  end
data/recipes/logrotate.rb CHANGED
@@ -30,12 +30,17 @@ Capistrano::Configuration.instance(true).load do
30
30
 
31
31
  desc "Move log directory to /mnt"
32
32
  task :move_log_dir_to_mnt do
33
- sudo "mkdir -p /mnt/application_logs/#{application}"
34
- sudo "chown -R #{user}:#{user} /mnt/application_logs/#{application}"
35
- sudo "mv /var/www/apps/#{application}/shared/log/* /mnt/application_logs/#{application}"
36
- sudo "rm -fr /var/www/apps/#{application}/shared/log"
37
- sudo "ln -s /mnt/application_logs/#{application} /var/www/apps/#{application}/shared/log"
38
- # Now need to deploy the app.
33
+ if Dir.exists?("/mnt/application_logs/#{application}")
34
+ # do nothing
35
+ puts "Doing nothing as the application log directory already exists in mount."
36
+ else
37
+ sudo "mkdir -p /mnt/application_logs/#{application}"
38
+ sudo "chown -R #{user}:#{user} /mnt/application_logs/#{application}"
39
+ sudo "mv /var/www/apps/#{application}/shared/log/* /mnt/application_logs/#{application}"
40
+ sudo "rm -fr /var/www/apps/#{application}/shared/log"
41
+ sudo "ln -s /mnt/application_logs/#{application} /var/www/apps/#{application}/shared/log"
42
+ # Now need to deploy the app.
43
+ end
39
44
  end
40
45
 
41
46
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 23
9
- version: 0.6.23
8
+ - 24
9
+ version: 0.6.24
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alastair Brunton