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'], + } }