tvd-runit 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
@@ -17,9 +17,10 @@
17
17
  # limitations under the License.
18
18
  #
19
19
 
20
- define :runit_service, :services_defined => nil, :only_if => false, :options => Hash.new do
20
+ define :runit_service, :only_if => false, :options => Hash.new do
21
21
  params[:template_name] ||= params[:name]
22
22
  params[:env] ||= {}
23
+ params[:activate] ||= false
23
24
 
24
25
  services_current = "#{params[:project_dir]}/current/service"
25
26
  services_run = "#{params[:project_dir]}/service"
@@ -33,6 +34,13 @@ define :runit_service, :services_defined => nil, :only_if => false, :options =>
33
34
 
34
35
  directory svc_defined
35
36
 
37
+ unless paras[:activate]
38
+ execute "#{svc_defined}/down" do
39
+ command "touch #{svc_defined}/down"
40
+ creates "touch #{svc_defined}/down"
41
+ end
42
+ end
43
+
36
44
  cookbook_file "#{svc_defined}/run" do
37
45
  mode 0755
38
46
  source "sv-#{params[:template_name]}-run"
@@ -71,13 +79,14 @@ define :runit_service, :services_defined => nil, :only_if => false, :options =>
71
79
  end
72
80
  end
73
81
 
74
- unless params[:project_dir] == params[:release_dir]
82
+ unless params[:project_dir] == params[:release_dir] || params[:activate] == false
75
83
  directory services_run
76
84
 
77
85
  directory svc_run
86
+
78
87
  directory "#{svc_run}/log"
79
- link "#{svc_run}/run" do
80
88
 
89
+ link "#{svc_run}/run" do
81
90
  to "#{svc_current}/run"
82
91
  end
83
92
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tvd-runit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-18 00:00:00.000000000 Z
12
+ date: 2012-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: microwave