Merge remote-tracking branch 'waldi/keyring-ssl'
[mirror/dsa-puppet.git] / modules / xinetd / manifests / service.pp
index 5c8f954..c348579 100644 (file)
@@ -1,7 +1,8 @@
 define xinetd::service (
        $id,
        $server,
-       $port,
+       $service,
+       $port='',
        $bind='',
        $type='',
        $socket_type=stream,
@@ -26,9 +27,14 @@ define xinetd::service (
        }
 
        if $ferm {
+               $fermport = $port ? {
+                       "" => $service,
+                       default => $port
+               }
+
                @ferm::rule { "dsa-xinetd-${name}":
-                       description => "Allow traffic to ${port}",
-                       rule        => "&SERVICE(${protocol}, ${port})"
+                       description => "Allow traffic to ${service}",
+                       rule        => "&SERVICE(${protocol}, ${fermport})"
                }
        }