foreman_debian 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/lib/foreman_debian/initd/engine.rb +22 -5
- 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: 83f74357101041b2c90242449b2200e41454f246
|
4
|
+
data.tar.gz: 33b81a3cfbf5614e7e2cf7b614d1a243084644b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e12a07e83b269262ace8ef9e98f6f4d122c726ea1a6a577e71ef61f5f5345bce1ca93302a7dde98e6f635125bd1612372d261a7c9f68d55033f008ddab3850a1
|
7
|
+
data.tar.gz: fe42f9dd41f53bbefb58c5e4ea7592d21f56ca6581b550aab87f74dc57609f6e2beb2eb5f21c12bf9f4c038496ade30e612a893a3eb3555439dbb271600f3e50
|
@@ -33,10 +33,10 @@ module ForemanDebian
|
|
33
33
|
threads = []
|
34
34
|
each_file do |path|
|
35
35
|
threads << Thread.new do
|
36
|
-
|
36
|
+
start_process(path)
|
37
37
|
@output.info " start #{path.to_s}"
|
38
38
|
end
|
39
|
-
|
39
|
+
enable_start_process_on_boot(path)
|
40
40
|
end
|
41
41
|
ThreadsWait.all_waits(*threads)
|
42
42
|
end
|
@@ -46,15 +46,32 @@ module ForemanDebian
|
|
46
46
|
each_file do |path|
|
47
47
|
@output.info " stop #{path.to_s}"
|
48
48
|
threads << Thread.new do
|
49
|
-
|
49
|
+
stop_process(path)
|
50
50
|
end
|
51
|
-
|
51
|
+
disable_start_process_on_boot(path)
|
52
52
|
end
|
53
53
|
ThreadsWait.all_waits(*threads)
|
54
54
|
end
|
55
55
|
|
56
|
+
def start_process(path)
|
57
|
+
exec_command("#{path.to_s} start")
|
58
|
+
end
|
59
|
+
|
60
|
+
def stop_process(path)
|
61
|
+
exec_command("#{path.to_s} stop")
|
62
|
+
end
|
63
|
+
|
64
|
+
def enable_start_process_on_boot(path)
|
65
|
+
exec_command("update-rc.d #{path.basename} defaults") if path.dirname.eql? @system_export_path
|
66
|
+
end
|
67
|
+
|
68
|
+
def disable_start_process_on_boot(path)
|
69
|
+
exec_command("update-rc.d -f #{path.basename} remove") if path.dirname.eql? @system_export_path
|
70
|
+
end
|
71
|
+
|
56
72
|
def remove_file(path)
|
57
|
-
|
73
|
+
stop_process(path)
|
74
|
+
disable_start_process_on_boot(path)
|
58
75
|
super(path)
|
59
76
|
end
|
60
77
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_debian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cargomedia
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: clamp
|