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:
-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