Browse Source

fix: 解决 ufw 防火墙版本加载失败问题 (#742)

pull/746/head
ssongliu 2 years ago committed by GitHub
parent
commit
549ccbe6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      backend/utils/firewall/client/ufw.go

2
backend/utils/firewall/client/ufw.go

@ -38,7 +38,7 @@ func (f *Ufw) Status() (string, error) {
}
func (f *Ufw) Version() (string, error) {
stdout, err := cmd.Execf("%s version | grep ufwHasNoPasswordSudo", f.CmdStr)
stdout, err := cmd.Execf("%s version | grep ufw", f.CmdStr)
if err != nil {
return "", fmt.Errorf("load the firewall status failed, err: %s", stdout)
}

Loading…
Cancel
Save