mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
fix: 解决 ufw 防火墙版本加载失败问题 (#742)
This commit is contained in:
parent
7fd6afb17f
commit
549ccbe6a0
@ -38,7 +38,7 @@ func (f *Ufw) Status() (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *Ufw) Version() (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 {
|
if err != nil {
|
||||||
return "", fmt.Errorf("load the firewall status failed, err: %s", stdout)
|
return "", fmt.Errorf("load the firewall status failed, err: %s", stdout)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user