I want to check the status of a specific port of ufw in shell script.
To check the status I wrote like this.
ufw status | grep -c "^443\s\+ALLOW"It works now for my usage, but if possible I want to use more stable way.
Is there a better way to check the port status of ufw?