2024-02-23 13:55:05 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Make sure script is running as root
|
|
|
|
if [ "$EUID" -ne 0 ]
|
|
|
|
then echo "Please run as root"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Install nginx
|
|
|
|
sudo apt update
|
2024-02-23 14:42:15 +11:00
|
|
|
sudo apt install nginx python3-pip -y
|
2024-02-23 13:55:05 +11:00
|
|
|
|
|
|
|
cd /root
|
|
|
|
git clone https://git.woodburn.au/nathanwoodburn/site-manager.git
|
|
|
|
cd site-manager
|
|
|
|
chmod +x *.sh
|
2024-02-23 14:42:15 +11:00
|
|
|
python3 -m pip install -r requirements.txt
|
2024-02-23 13:55:05 +11:00
|
|
|
|
|
|
|
# Install python script as a service
|
2024-02-23 14:42:15 +11:00
|
|
|
sudo cp ./nginx-manager.service /etc/systemd/system/nginx-manager.service
|
|
|
|
sudo systemctl start nginx-manager
|
|
|
|
sudo systemctl enable nginx-manager
|