site-manager/install.sh

28 lines
699 B
Bash
Raw Permalink Normal View History

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 15:51:56 +11:00
sudo apt install nginx python3-pip zip unzip -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
2024-02-23 15:30:57 +11:00
# Install certbot
sudo snap install core; sudo snap refresh core
sudo apt remove certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot