Add check for nftables on daemon start.

This commit is contained in:
cameronts 2022-08-02 15:58:39 -07:00
parent e6d7c95669
commit 766084d6a3

View file

@ -43,6 +43,16 @@ func checkin() {
var nodeCfg config.ClientConfig
nodeCfg.Network = network
nodeCfg.ReadConfig()
// check for nftables present if on Linux
if ncutils.IsLinux() {
if ncutils.IsNFTablesPresent() {
nodeCfg.Node.IsNFTablesPresent = "yes"
} else {
nodeCfg.Node.IsNFTablesPresent = "no"
}
} else {
nodeCfg.Node.IsNFTablesPresent = "no"
}
if nodeCfg.Node.IsStatic != "yes" {
extIP, err := ncutils.GetPublicIP()
if err != nil {