Sha256: 129473d79f4808bc619f75b19a326499dc55083c129a90c53fe16c11d29f5cc7

Contents?: true

Size: 1.43 KB

Versions: 3

Compression:

Stored size: 1.43 KB

Contents

#
# Cookbook Name:: git
# Recipe:: server
#
# Copyright 2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if node["platform"] == "windows"
  return "#{node['platform']} is not supported by the #{cookbook_name}::#{recipe_name} recipe"
end

include_recipe "git"

directory node["git"]["server"]["base_path"] do
  owner "root"
  group "root"
  mode 00755
end

case node['platform_family']
when "debian"
  include_recipe "runit"

  package "git-daemon-run"

  runit_service "git-daemon" do
    sv_templates false
  end
when "rhel"
  package "git-daemon"

  template "/etc/xinetd.d/git" do
    backup false
    source "git-xinetd.d.erb"
    owner "root"
    group "root"
    mode 00644
  end

  service "xinetd" do
    action [:enable, :restart]
  end
else
  log "Platform requires setting up a git daemon service script."
  log "Hint: /usr/bin/git daemon --export-all --user=nobody --group=daemon --base-path=#{node["git"]["server"]["base_path"]}"
end

Version data entries

3 entries across 2 versions & 2 rubygems

Version Path
guard-strainer-1.0.0 spec/fixtures/cookbooks/git/recipes/server.rb
vagrant-openstack-0.0.4 tmp/librarian/cache/source/chef/site/877777683730772c36b1e6a3fc3aa2c3/git/version-uri/306302c1591982b67153d5c49a36c542/package/recipes/server.rb
vagrant-openstack-0.0.4 cookbooks/git/recipes/server.rb