#331 do not set community{_rw} defaults

This commit is contained in:
Oliver Gorwits
2017-09-21 20:12:22 +01:00
parent 65ba93acc0
commit 8dc4b9bc0e
2 changed files with 9 additions and 2 deletions

View File

@@ -52,6 +52,13 @@ if (ref {} eq ref setting('database')) {
# always set this
$ENV{DBIC_TRACE_PROFILE} = 'console';
# if snmp_auth or device_auth not set, add defaults to community{_rw}
if ((setting('snmp_auth') and 0 == scalar @{ setting('snmp_auth') })
or (setting('device_auth') and 0 == scalar @{ setting('device_auth') })) {
config->{'community'} = [ @{setting('community')}, 'public' ];
config->{'community_rw'} = [ @{setting('community_rw')}, 'private' ];
}
# defaults for workers
setting('workers')->{queue} ||= 'PostgreSQL';
if (exists setting('workers')->{interactives}