优化代码

This commit is contained in:
GoEdgeLab
2022-04-12 21:43:19 +08:00
parent 8a0ef47a64
commit d286cb25bc
3 changed files with 8 additions and 4 deletions

View File

@@ -27,6 +27,8 @@ func NewFirewalld() *Firewalld {
err := cmd.Run()
if err == nil {
firewalld.exe = path
// TODO check firewalld status with 'firewall-cmd --state' (running or not running),
// but we should recover the state when firewalld state changes, maybe check it every minutes
firewalld.isReady = true
firewalld.init()
}