abusesa::serivices: Add support for filesystem paths

This commit is contained in:
Ossi Salmi 2016-01-20 15:30:52 +02:00
parent d82e3021a4
commit 85eec8d22b
2 changed files with 11 additions and 0 deletions

View file

@ -2,6 +2,7 @@
# #
class abusesa::services( class abusesa::services(
$allow_dn=undef, $allow_dn=undef,
$paths=[],
$services=[], $services=[],
$socketdir='/var/lib/abuserv/run', $socketdir='/var/lib/abuserv/run',
) { ) {

View file

@ -20,6 +20,16 @@ server {
return 403; return 403;
} }
<% end -%>
<% @paths.each do |path|
filep, sep, urlp = path.partition(':')
continue if filep.empty? or urlp.empty?
-%>
location <%= urlp %> {
alias <%= filep %>;
autoindex on;
}
<% end -%> <% end -%>
<% @services.each do |service| <% @services.each do |service|
dir, sep, sock = service.rpartition('/') dir, sep, sock = service.rpartition('/')