From: Tom Hughes Date: Wed, 2 Oct 2013 20:20:15 +0000 (+0100) Subject: Manage the git server xinetd config X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/e37fbb62e5a4f2851bf304344117983d9d251c96 Manage the git server xinetd config --- diff --git a/cookbooks/git/metadata.rb b/cookbooks/git/metadata.rb index 1b30312ad..63c60c5a2 100644 --- a/cookbooks/git/metadata.rb +++ b/cookbooks/git/metadata.rb @@ -5,6 +5,7 @@ description "Installs and configures git" long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) version "1.0.0" depends "networking" +depends "xinetd" depends "apache" attribute "git", diff --git a/cookbooks/git/recipes/server.rb b/cookbooks/git/recipes/server.rb index 59ada04a8..a287c6199 100644 --- a/cookbooks/git/recipes/server.rb +++ b/cookbooks/git/recipes/server.rb @@ -18,6 +18,7 @@ # include_recipe "networking" +include_recipe "xinetd" git_directory = node[:git][:directory] @@ -77,3 +78,11 @@ template "/etc/cron.daily/git-backup" do group "root" mode 0755 end + +template "/etc/xinetd.d/git" do + source "xinetd.erb" + owner "root" + group "root" + mode 0644 + notifies :reload, resources(:service => "xinetd") +end diff --git a/cookbooks/git/templates/default/xinetd.erb b/cookbooks/git/templates/default/xinetd.erb new file mode 100644 index 000000000..403c7926b --- /dev/null +++ b/cookbooks/git/templates/default/xinetd.erb @@ -0,0 +1,13 @@ +# DO NOT EDIT - This file is being maintained by Chef + +service git +{ + disable = no + socket_type = stream + wait = no + user = nobody + server = /usr/lib/git-core/git-daemon + server_args = --base-path=<%= node[:git][:directory] %> --export-all --syslog --inetd --verbose + log_on_failure += USERID + flags = ipv6 +}