Commit 6e7d85783622ad3d79714151f6e47ab73f458511

Authored by Jacob Vosmaer
1 parent 83e92d68

Import new runit recipe from omnibus-chef-server

Source:
https://github.com/opscode/omnibus-chef-server/blob/bc429109ab974f7bc5775123e8b1fe95931ce5a9/files/chef-server-cookbooks/runit/recipes/default.rb
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 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 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 27 include_recipe "runit::upstart"
27 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 34 end
  35 +when "fedora"
  36 + # TODO: platform_version check for old distro without upstart
  37 + include_recipe "runit::upstart"
30 38 else
31 39 include_recipe "runit::sysvinit"
32 40 end
... ...