]> git.openstreetmap.org Git - chef.git/commitdiff
Manage the git server xinetd config
authorTom Hughes <tom@compton.nu>
Wed, 2 Oct 2013 20:20:15 +0000 (21:20 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 2 Oct 2013 20:20:15 +0000 (21:20 +0100)
cookbooks/git/metadata.rb
cookbooks/git/recipes/server.rb
cookbooks/git/templates/default/xinetd.erb [new file with mode: 0644]

index 1b30312ad91f83f3327429a8ebb8a9a8456a9020..63c60c5a28016913be4cb1cf3fb7f34077b07a78 100644 (file)
@@ -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",
index 59ada04a8373ebeaeff86b77b11c1b591675ac91..a287c61995a9051364c4870bbae0c0fe57e81faa 100644 (file)
@@ -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 (file)
index 0000000..403c792
--- /dev/null
@@ -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
+}