abusesa::serivices: Add support for filesystem paths
This commit is contained in:
parent
d82e3021a4
commit
85eec8d22b
2 changed files with 11 additions and 0 deletions
|
@ -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',
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -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('/')
|
||||||
|
|
Loading…
Add table
Reference in a new issue