Add FIREWALL variable, refers to #171
This commit is contained in:
@@ -4,8 +4,15 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
libparams "github.com/qdm12/golibs/params"
|
||||
)
|
||||
|
||||
// GetFirewall obtains if the firewall should be enabled from the environment variable FIREWALL
|
||||
func (r *reader) GetFirewall() (enabled bool, err error) {
|
||||
return r.envParams.GetOnOff("FIREWALL", libparams.Default("on"))
|
||||
}
|
||||
|
||||
// GetExtraSubnets obtains the CIDR subnets from the comma separated list of the
|
||||
// environment variable EXTRA_SUBNETS
|
||||
func (r *reader) GetExtraSubnets() (extraSubnets []net.IPNet, err error) {
|
||||
|
||||
Reference in New Issue
Block a user