forked from rezaganz123/KolaxxTheme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
90 lines (77 loc) · 2.12 KB
/
install.sh
File metadata and controls
90 lines (77 loc) · 2.12 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
if (( $EUID != 0 )); then
echo "Veuillez exécuter en tant que root"
exit
fi
clear
installTheme(){
cd /var/www/
tar -cvf KolaxxThemebackup.tar.gz pterodactyl
echo "Installation du thème..."
cd /var/www/pterodactyl
rm -r KolaxxTheme
git clone https://github.com/KolaxxDev/KolaxxTheme.git
cd KolaxxTheme
rm /var/www/pterodactyl/resources/scripts/KolaxxTheme.css
rm /var/www/pterodactyl/resources/scripts/index.tsx
mv index.tsx /var/www/pterodactyl/resources/scripts/index.tsx
mv KolaxxTheme.css /var/www/pterodactyl/resources/scripts/KolaxxTheme.css
cd /var/www/pterodactyl
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
apt update
apt install -y nodejs
npm i -g yarn
yarn
cd /var/www/pterodactyl
yarn build:production
sudo php artisan optimize:clear
}
installThemeQuestion(){
while true; do
read -p "Voulez-vous vraiment installer le thème [y/n]? " yn
case $yn in
[Yy]* ) installTheme; break;;
[Nn]* ) exit;;
* ) echo "Veuillez répondre par yes ou par no.";;
esac
done
}
repair(){
bash <(curl https://raw.githubusercontent.com/KolaxxDev/KolaxxTheme/master/repair.sh)
}
restoreBackUp(){
echo "Restauration de la sauvegarde..."
cd /var/www/
tar -xvf KolaxxThemebackup.tar.gz
rm KolaxxThemebackup.tar.gz
cd /var/www/pterodactyl
yarn build:production
sudo php artisan optimize:clear
}
echo "Copyright (c) 2023 Kolaxx | goodlaxx.fr"
echo "Ce programme est un logiciel libre : vous pouvez le redistribuer et/ou le modifier"
echo ""
echo "Discord: https://goodlaxx.fr/discord"
echo "Website: https://goodlaxx.fr"
echo ""
echo "[1] Installer le thème"
echo "[2] Restaurer la sauvegarde"
echo "[3] Réparer le panel (à utiliser si vous avez une erreur dans l’installation du thème)"
echo "[4] Annuler"
read -p "Veuillez saisir un numéro: " choice
if [ $choice == "1" ]
then
installThemeQuestion
fi
if [ $choice == "2" ]
then
restoreBackUp
fi
if [ $choice == "3" ]
then
repair
fi
if [ $choice == "4" ]
then
exit
fi