mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-14 05:06:18 +00:00
Refactor | Add Utils, Firewall & Monitoring
This commit is contained in:
14
web/install_nginx.sh
Normal file
14
web/install_nginx.sh
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user