From 9173bc92d17dbfc387f73912b5dca4530d3a07c1 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 10 Jul 2013 17:39:30 -0700 Subject: [PATCH] Add git-daemon to cgit server. * modules/cgit/files/git.xinetd: Configure git xinetd * modules/cgit/manifests/init.pp: Install git xinetd file and make sure the * service is running. Change-Id: I7686b1cacd257e2aa519885b969272055a74e48e --- modules/cgit/files/git.xinetd | 14 ++++++++++++++ modules/cgit/manifests/init.pp | 13 +++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 modules/cgit/files/git.xinetd diff --git a/modules/cgit/files/git.xinetd b/modules/cgit/files/git.xinetd new file mode 100644 index 0000000000..d427f235d9 --- /dev/null +++ b/modules/cgit/files/git.xinetd @@ -0,0 +1,14 @@ +# default: off +# description: The git dæmon allows git repositories to be exported using \ +# the git:// protocol. + +service git +{ + disable = no + socket_type = stream + wait = no + user = nobody + server = /usr/libexec/git-core/git-daemon + server_args = --base-path=/var/lib/git --export-all --syslog --inetd --verbose /var/lib/git + log_on_failure += USERID +} diff --git a/modules/cgit/manifests/init.pp b/modules/cgit/manifests/init.pp index a3ae155314..5279a31df2 100644 --- a/modules/cgit/manifests/init.pp +++ b/modules/cgit/manifests/init.pp @@ -71,4 +71,17 @@ class cgit { source => 'puppet:///modules/cgit/cgit.conf', mode => '0644' } + + file { '/etc/xinetd.d/git': + ensure => present, + owner => 'root', + group => 'root', + mode => '0644', + source => 'puppet:///modules/cgit/git.xinetd', + } + + service { 'xinetd': + ensure => running, + subscribe => File['/etc/xinetd.d/git'], + } }