fix: 解决开启防火墙未添加系统端口的问题 (#586)

This commit is contained in:
ssongliu 2023-04-12 08:36:29 +08:00 committed by GitHub
parent 3ac467fc53
commit f092927ab8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,6 +147,7 @@ func (u *FirewallService) OperateFirewall(operation string) error {
if err := client.Port(fireClient.FireInfo{Port: serverPort.Value, Protocol: "tcp", Strategy: "accept"}, "add"); err != nil {
return err
}
_ = client.Reload()
_, _ = cmd.Exec("systemctl restart docker")
return nil
case "stop":