mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
committed by
Tim Abbott
parent
473c8fa81a
commit
4739c4b057
@@ -37,6 +37,11 @@ class zulip::smokescreen {
|
||||
}
|
||||
|
||||
$listen_address = zulipconf('http_proxy', 'listen_address', '127.0.0.1')
|
||||
$allow_addresses = split(zulipconf('http_proxy', 'allow_addresses', ''), ',')
|
||||
$allow_ranges = split(zulipconf('http_proxy', 'allow_ranges', ''), ',')
|
||||
$deny_addresses = split(zulipconf('http_proxy', 'deny_addresses', ''), ',')
|
||||
$deny_ranges = split(zulipconf('http_proxy', 'deny_ranges', ''), ',')
|
||||
|
||||
file { "${zulip::common::supervisor_conf_dir}/smokescreen.conf":
|
||||
ensure => file,
|
||||
require => [
|
||||
|
@@ -1,5 +1,20 @@
|
||||
<%
|
||||
|
||||
acls = []
|
||||
acls.concat(@allow_addresses.map {|a| "--allow-address #{a}"})
|
||||
acls.concat(@allow_ranges.map {|a| "--allow-range #{a}"})
|
||||
acls.concat(@deny_addresses.map {|a| "--deny-address #{a}"})
|
||||
acls.concat(@deny_ranges.map {|a| "--deny-range #{a}"})
|
||||
|
||||
if acls.empty?
|
||||
acl = ""
|
||||
else
|
||||
acl = " " + acls.join(" ")
|
||||
end
|
||||
|
||||
-%>
|
||||
[program:smokescreen]
|
||||
command=<%= @bin %> --listen-ip <%= @listen_address %> --expose-prometheus-metrics --prometheus-port 4760
|
||||
command=<%= @bin %> --listen-ip <%= @listen_address %> --expose-prometheus-metrics --prometheus-port 4760<%= acl %>
|
||||
priority=15
|
||||
autostart=true
|
||||
autorestart=true
|
||||
|
Reference in New Issue
Block a user