parts of the nagios setup
[mirror/dsa-puppet.git] / modules / xinetd / templates / service.erb
index 33a9de7..c969b33 100644 (file)
@@ -1,16 +1,28 @@
-service <%= scope.lookupvar('port') %>
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+service <%= scope.lookupvar('service') %>
 {
 <%- if scope.lookupvar('bind') != '' -%>
        bind            = <%= scope.lookupvar('bind') %>
 <%- end -%>
 <%- if scope.lookupvar('type') != '' -%>
        type            = <%= scope.lookupvar('type') %>
+<%- end -%>
+<%- if scope.lookupvar('port') != '' -%>
+       port            = <%= scope.lookupvar('port') %>
 <%- end -%>
        id              = <%= scope.lookupvar('id') %>
 
        socket_type     = <%= scope.lookupvar('socket_type') %>
        protocol        = <%= scope.lookupvar('protocol') %>
+<%- if scope.lookupvar('flags') != '' -%>
        flags           = <%= scope.lookupvar('flags') %>
+<%- elsif scope.lookupvar('bind') =~  /:/ or scope.lookupvar('bind') == "" -%>
+       flags           = IPv6
+<%- end -%>
        wait            = <%= scope.lookupvar('wait') %>
        user            = <%= scope.lookupvar('user') %>
 <%- if scope.lookupvar('group') != '' -%>