engineyard-eycap 0.4.10 → 0.4.11
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -1
- data/lib/eycap/recipes/database.rb +3 -6
- data/lib/eycap/recipes/nginx.rb +2 -2
- data/lib/eycap.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
@@ -63,14 +63,11 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
63
63
|
get "#{backup_file}.bz2", "/tmp/#{application}.sql.gz"
|
64
64
|
development_info = YAML.load_file("config/database.yml")['development']
|
65
65
|
if development_info['adapter'] == 'mysql'
|
66
|
-
|
67
|
-
ch.send_data "#{development_info['password']}\n" if out=~ /Enter password:/
|
68
|
-
end
|
66
|
+
run_str = "bzcat /tmp/#{application}.sql.gz | mysql -u #{development_info['username']} --password='#{development_info['password']}' -h #{development_info['host']} #{development_info['database']}"
|
69
67
|
else
|
70
|
-
|
71
|
-
ch.send_data "#{development_info['password']}\n" if out=~ /^Password/
|
72
|
-
end
|
68
|
+
run_str = "PGPASSWORD=#{development_info['password']} bzcat /tmp/#{application}.sql.gz | psql -U #{development_info['username']} -h #{development_info['host']} #{development_info['database']}"
|
73
69
|
end
|
70
|
+
%x!#{run_str}!
|
74
71
|
end
|
75
72
|
end
|
76
73
|
|
data/lib/eycap/recipes/nginx.rb
CHANGED
@@ -3,12 +3,12 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
3
3
|
namespace :nginx do
|
4
4
|
desc "Start Nginx on the app slices."
|
5
5
|
task :start, :roles => :app do
|
6
|
-
sudo "nohup /etc/init.d/nginx start
|
6
|
+
sudo "nohup /etc/init.d/nginx start 2>&1 | cat"
|
7
7
|
end
|
8
8
|
|
9
9
|
desc "Restart the Nginx processes on the app slices."
|
10
10
|
task :restart , :roles => :app do
|
11
|
-
sudo "nohup /etc/init.d/nginx restart
|
11
|
+
sudo "nohup /etc/init.d/nginx restart 2>&1 | cat"
|
12
12
|
end
|
13
13
|
|
14
14
|
desc "Stop the Nginx processes on the app slices."
|
data/lib/eycap.rb
CHANGED