-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
37 lines (37 loc) · 1.35 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
clear
echo "XeonPanel Deamon v0.8 Installation Script"
echo "Copyright © 2022 Xeonpanel."
echo "For support join our community: https://discord.gg/4y9X28Ubxd"
sleep 1s
echo ""
if [ "$(id -u)" != "0" ]; then
printf "This script must be run as root\nYou can login as root with\033[0;32m sudo su -\033[0m\n" 1>&2
exit 1
fi
read -p "Are you sure you want to continue? [y/n] " installation
if [[ $installation == "y" || $installation == "Y" || $installation == "yes" || $installation == "Yes" ]]
then
sudo apt update
sudo apt --ignore-missing install git python3 python3-pip docker containerd docker.io
python3 -m pip install flask flask_sock flask_cors docker waitress
cd /etc
sudo git clone https://github.com/Xeonpanel/Deamon.git deamon
sudo mv /etc/deamon/deamon.service /etc/systemd/system/
echo "Installing nginx config..."
clear
read -p 'Enter your domain ( No IP ): ' domain
service nginx stop
certbot certonly --standalone -d $domain
cp /etc/deamon/deamon.conf /etc/nginx/sites-available/deamon.conf
sed -i "s/url/$domain/" /etc/nginx/sites-available/deamon.conf
ln -s /etc/nginx/sites-available/deamon.conf /etc/nginx/sites-enabled/deamon.conf
systemctl restart nginx
echo ""
echo " --> Installation completed"
echo ""
else
echo ""
echo " --> Installation cancelled"
echo ""
fi