Check if firewalld service is running (#247)

This commit is contained in:
Elbakyan Shirak 2024-05-23 18:12:24 +04:00 committed by GitHub
parent f18536b61e
commit 5014429c2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -548,11 +548,13 @@ setup_openresty(){
done
fi
if rpm -q "firewalld"; then
if $PACKAGE_MANAGER firewalld >/dev/null 2>&1; then
if [ $(systemctl is-active firewalld.service) == active ]; then
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
systemctl restart firewalld.service
fi
fi
elif [ "$DIST" = "Debian" ]; then
if ! id "nginx" &>/dev/null; then
rm -dfr /var/log/nginx/*