kubez-ansible icon indicating copy to clipboard operation
kubez-ansible copied to clipboard

setup_env.sh中关闭Ubuntu ufw问题

Open Awadabang opened this issue 1 year ago • 0 comments

if [[ "$(systemctl is-enabled ufw)" == "active" ]]; then
        systemctl disable ufw
fi
if [[ "$(systemctl is-active ufw)" == "enabled" ]]; then
        systemctl stop ufw
fi

systemctl is-enabled ufw 返回值应该判断是不是enabled吧,systemctl is-active ufw同理

Awadabang avatar Sep 28 '23 16:09 Awadabang