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

This commit is contained in:
ssongliu 2023-04-21 12:28:11 +08:00 committed by GitHub
parent 7fd6afb17f
commit 549ccbe6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}