tvd-runit 0.0.4 → 0.0.5

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.4
1
+ 0.0.5
@@ -21,25 +21,38 @@ define :runit_service, :services_defined => nil, :only_if => false, :options =>
21
21
  params[:template_name] ||= params[:name]
22
22
  params[:env] ||= {}
23
23
 
24
- svdir = "#{params[:services_defined]}/#{params[:name]}"
24
+ svc_defined = "#{params[:services_defined]}/#{params[:name]}"
25
+ svc_run = "#{params[:services_run]}/#{params[:name]}"
26
+ svc_current = "#{params[:services_current]}/#{params[:name]}"
25
27
 
26
- directory svdir
28
+ directory params[:services_defined]
29
+ directory params[:services_run]
27
30
 
28
- cookbook_file "#{svdir}/run" do
31
+ directory svc_defined
32
+ directory svc_run
33
+
34
+ cookbook_file "#{svc_defined}/run" do
29
35
  mode 0755
30
36
  source "sv-#{params[:template_name]}-run"
31
37
  cookbook params[:cookbook] if params[:cookbook]
32
38
  end
39
+ link "#{svc_run}/run" do
40
+ to "#{svc_current}/run"
41
+ end
33
42
 
34
- directory "#{svdir}/log"
43
+ directory "#{svc_defined}/log"
44
+ directory "#{svc_run}/log"
35
45
 
36
- cookbook_file "#{svdir}/log/run" do
46
+ cookbook_file "#{svc_defined}/log/run" do
37
47
  mode 0755
38
48
  source "sv-log-run"
39
49
  cookbook "runit"
40
50
  end
51
+ link "#{svc_run}/log/run" do
52
+ to "#{svc_current}/log/run"
53
+ end
41
54
 
42
- template "#{svdir}/log/config" do
55
+ template "#{svc_defined}/log/config" do
43
56
  mode 0644
44
57
  source "sv-log-config.erb"
45
58
  cookbook "runit"
@@ -47,8 +60,14 @@ define :runit_service, :services_defined => nil, :only_if => false, :options =>
47
60
  variables :options => params[:options]
48
61
  end
49
62
  end
63
+ link "#{svc_run}/log/config" do
64
+ to "#{svc_current}/log/config"
65
+ end
50
66
 
51
- directory "#{svdir}/env"
67
+ directory "#{svc_defined}/env"
68
+ link "#{svc_run}/env" do
69
+ to "#{svc_current}/env"
70
+ end
52
71
 
53
72
  runit_env = {
54
73
  "PATH" => ENV['PATH'],
@@ -56,7 +75,7 @@ define :runit_service, :services_defined => nil, :only_if => false, :options =>
56
75
  }
57
76
 
58
77
  runit_env.merge(params[:env]).each do |varname, value|
59
- template "#{svdir}/env/#{varname}" do
78
+ template "#{svc_defined}/env/#{varname}" do
60
79
  source "envdir.erb"
61
80
  mode 0644
62
81
  cookbook "runit"
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.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: