Commit 4c81d4ba456d0b4991554164c07d9028415f9845

Authored by Jacob Vosmaer
2 parents b3d5ef02 6e7d8578

Merge branch 'update_runit_recipe' into 'master'

Update runit recipe
Showing 1 changed file with 14 additions and 6 deletions   Show diff stats
files/gitlab-cookbooks/runit/recipes/default.rb
@@ -17,16 +17,24 @@ @@ -17,16 +17,24 @@
17 # limitations under the License. 17 # limitations under the License.
18 # 18 #
19 19
20 -# TODO: This needs RHEL support  
21 -case node["platform"]  
22 -when "ubuntu" 20 +case node["platform_family"]
  21 +when "debian"
23 include_recipe "runit::upstart" 22 include_recipe "runit::upstart"
24 -when "redhat", "centos", "rhel", "scientific", "oracle"  
25 - if node['platform_version'] =~ /^6/ 23 +when "rhel"
  24 + case node["platform"]
  25 + when "amazon", "xenserver"
  26 + # TODO: platform_version check for old distro without upstart
26 include_recipe "runit::upstart" 27 include_recipe "runit::upstart"
27 else 28 else
28 - include_recipe "runit::sysvinit" 29 + if node['platform_version'] =~ /^5/
  30 + include_recipe "runit::sysvinit"
  31 + else # >= 6.0
  32 + include_recipe "runit::upstart"
  33 + end
29 end 34 end
  35 +when "fedora"
  36 + # TODO: platform_version check for old distro without upstart
  37 + include_recipe "runit::upstart"
30 else 38 else
31 include_recipe "runit::sysvinit" 39 include_recipe "runit::sysvinit"
32 end 40 end