capistrano-atlas 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d629e2e88266758e7f3ac773a06fb75f66ae277
|
4
|
+
data.tar.gz: d969ed5b74cb60a8b652310724733f07021c04e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26d91a334306695c3bb9db50fc46495b89740716427954b12828c0a4d8c5b5a86dd35e6e883541c6cb573032eb8f2aaf8818287840e51b08b063eec5c5d24bd1
|
7
|
+
data.tar.gz: 650aabaa3bd44587d31ca610a647c082e901ca1ead7140f5d25e3e979b53337554cf3001ef6b02a760f53444226a5a3d3716cbc11f8ca9edc8d69a4d8f3ed6ed
|
@@ -25,16 +25,16 @@ pumactl () {
|
|
25
25
|
|
26
26
|
case "$1" in
|
27
27
|
start)
|
28
|
-
|
28
|
+
$PUMACTL_CMD "start"
|
29
29
|
;;
|
30
30
|
stop)
|
31
|
-
|
31
|
+
$PUMACTL_CMD "stop"
|
32
32
|
;;
|
33
33
|
restart|reload)
|
34
|
-
|
34
|
+
$PUMACTL_CMD "phased-restart"
|
35
35
|
;;
|
36
36
|
status)
|
37
|
-
|
37
|
+
$PUMACTL_CMD "status"
|
38
38
|
;;
|
39
39
|
*)
|
40
40
|
echo >&2 "Usage: $0 <start|stop|restart|status>"
|
@@ -15,10 +15,10 @@ namespace :atlas do
|
|
15
15
|
privileged_on primary(:db) do
|
16
16
|
user = fetch(:atlas_postgresql_user)
|
17
17
|
|
18
|
-
unless test("sudo -
|
18
|
+
unless test("sudo -Hiu postgres psql -c '\\du' | grep -q #{user}")
|
19
19
|
passwd = fetch(:atlas_postgresql_password)
|
20
20
|
md5 = Digest::MD5.hexdigest(passwd + user)
|
21
|
-
execute "sudo -
|
21
|
+
execute "sudo -Hiu postgres psql -c " +
|
22
22
|
%Q["CREATE USER #{user} PASSWORD 'md5#{md5}';"]
|
23
23
|
end
|
24
24
|
end
|
@@ -30,8 +30,8 @@ namespace :atlas do
|
|
30
30
|
user = fetch(:atlas_postgresql_user)
|
31
31
|
db = fetch(:atlas_postgresql_database)
|
32
32
|
|
33
|
-
unless test("sudo -
|
34
|
-
execute "sudo -
|
33
|
+
unless test("sudo -Hiu postgres psql -l | grep -w -q #{db}")
|
34
|
+
execute "sudo -Hiu postgres createdb -O #{user} #{db}"
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -1,10 +1,9 @@
|
|
1
1
|
atlas_recipe :puma do
|
2
2
|
during "deploy:starting", "starting"
|
3
3
|
during :provision, %w(init_d nginx_site config_rb)
|
4
|
-
|
5
|
-
during "deploy:stop", "stop"
|
4
|
+
|
6
5
|
during "deploy:restart", "restart"
|
7
|
-
|
6
|
+
after "deploy:publishing", "restart"
|
8
7
|
end
|
9
8
|
|
10
9
|
namespace :atlas do
|