dory 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dory/config.rb +8 -1
- data/lib/dory/systemd.rb +13 -1
- data/lib/dory/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed21af67680e2286c0717b5b33de9f296b2664ce
|
4
|
+
data.tar.gz: 6b93398f6d7ccb2da694ef0c2ae591141b800c4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f87fe6bf2fa5f9bc37dc344fb4b6f85d9e377ffb0d4eb5d4a7f2d87c33153830d72850907169b5aea7a52536e768e9e131113465ad9d9f11f80969179c8b7484
|
7
|
+
data.tar.gz: 8c9fd422e6003319dea3ada3f9b946208396fe25e3ecd6045c31f6a1252aec48c3e5da7be1bc9d549a54ed6aba69e4a42ef4d4eb1ab5b57d7eb7e48074ec8b6f
|
data/lib/dory/config.rb
CHANGED
@@ -33,6 +33,7 @@ module Dory
|
|
33
33
|
# yes|true (go aheand and kill without asking)
|
34
34
|
# no|false (don't kill, and don't even ask)
|
35
35
|
kill_others: ask
|
36
|
+
service_start_delay: 5 # seconds to wait after restarting systemd services
|
36
37
|
nginx_proxy:
|
37
38
|
enabled: true
|
38
39
|
container_name: dory_dinghy_http_proxy
|
@@ -95,7 +96,13 @@ module Dory
|
|
95
96
|
end
|
96
97
|
|
97
98
|
# Add the option to skip prompts
|
98
|
-
newsettings[:dory][:dnsmasq][:kill_others]
|
99
|
+
unless newsettings[:dory][:dnsmasq][:kill_others]
|
100
|
+
newsettings[:dory][:dnsmasq][:kill_others] = 'ask'
|
101
|
+
end
|
102
|
+
|
103
|
+
unless newsettings[:dory][:dnsmasq][:service_start_delay]
|
104
|
+
newsettings[:dory][:dnsmasq][:service_start_delay] = 5
|
105
|
+
end
|
99
106
|
|
100
107
|
newsettings
|
101
108
|
end
|
data/lib/dory/systemd.rb
CHANGED
@@ -2,6 +2,10 @@ require_relative 'docker_service'
|
|
2
2
|
|
3
3
|
module Dory
|
4
4
|
module Systemd
|
5
|
+
def self.up_delay_seconds
|
6
|
+
Dory::Config.settings[:dory][:dnsmasq][:service_start_delay] || 5
|
7
|
+
end
|
8
|
+
|
5
9
|
def self.has_systemd?
|
6
10
|
Sh.run_command('which systemctl').success?
|
7
11
|
end
|
@@ -24,7 +28,15 @@ module Dory
|
|
24
28
|
def self.set_systemd_service(service:, up:)
|
25
29
|
action = up ? 'start' : 'stop'
|
26
30
|
puts "Requesting sudo to #{action} #{service}".green
|
27
|
-
Sh.run_command("sudo systemctl #{action} #{service}").success?
|
31
|
+
retval = Sh.run_command("sudo systemctl #{action} #{service}").success?
|
32
|
+
|
33
|
+
# We need to wait a few seconds for init if putting stuff up to avoid race conditions
|
34
|
+
if up
|
35
|
+
puts "Waiting #{self.up_delay_seconds} seconds for #{service} to start ...".green
|
36
|
+
sleep(self.up_delay_seconds)
|
37
|
+
end
|
38
|
+
|
39
|
+
retval
|
28
40
|
end
|
29
41
|
end
|
30
42
|
end
|
data/lib/dory/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Porter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|