Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-04-10 20:26:17 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-04-10 20:26:17 +0300
commit87f9c7b9f842b2a22ba0a6280929cf8ea43b391f (patch)
treea3d4aba602f97253a1214ec3591aef22059d3b35 /x-ui.sh
parentd74b39b9cffb282fceb77bb76dbc59a4ab723b45 (diff)
firewall install check
Diffstat (limited to 'x-ui.sh')
-rw-r--r--x-ui.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/x-ui.sh b/x-ui.sh
index b2a1f8fa..9b40de49 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -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