recipiez 0.6.23 → 0.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/recipiez/version.rb +1 -1
- data/recipes/logrotate.rb +11 -6
- metadata +2 -2
data/lib/recipiez/version.rb
CHANGED
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
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|