Refactor | Add Utils, Firewall & Monitoring

This commit is contained in:
2025-01-23 21:33:30 -03:00
parent d0394bffe1
commit 14480e4def
11 changed files with 204 additions and 129 deletions

14
web/install_nginx.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
function install_nginx() {
echo "[ WEB ]: Starting NginX setup"
if ! dpkg -l | grep -q nginx; then
sudo apt update
sudo apt install -y nginx
sudo systemctl start nginx
sudo systemctl enable nginx
echo "[ WEB ]: Installed NginX succesfully"
else
echo "[ WEB ]: NginX already installed, skipping..."
fi
}

10
web/setup_ufw.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
function setup_ufw() {
echo "[ WEB ]: Started UFW Firewall setup"
sudo apt-get install -y ufw
sudo ufw allow 22
sudo ufw allow 443
sudo ufw enable
echo "[ WEB ]: UFW Installed succesfully. Open ports SSH:22 - HTTPS:443"
}