diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-04-10 20:26:17 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-04-10 20:26:17 +0300 |
| commit | 87f9c7b9f842b2a22ba0a6280929cf8ea43b391f (patch) | |
| tree | a3d4aba602f97253a1214ec3591aef22059d3b35 | |
| parent | d74b39b9cffb282fceb77bb76dbc59a4ab723b45 (diff) | |
firewall install check
| -rw-r--r-- | x-ui.sh | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -455,6 +455,14 @@ ssl_cert_issue() { } open_ports() { +if ! command -v ufw &> /dev/null +then + echo "ufw firewall is not installed. Installing now..." + sudo apt-get update + sudo apt-get install -y ufw +else + echo "ufw firewall is already installed" +fi # Check if the firewall is inactive if sudo ufw status | grep -q "Status: active"; then |
