mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
firewall install check
This commit is contained in:
parent
d74b39b9cf
commit
87f9c7b9f8
1 changed files with 8 additions and 0 deletions
8
x-ui.sh
8
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
|
||||
|
|
Loading…
Reference in a new issue