forked from ajsuhaus/peri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
instaladorportugues.sh
102 lines (87 loc) · 2.46 KB
/
instaladorportugues.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
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
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
CYAN='\033[0;36m'
echo -e "${CYAN}Mudando Linguagem...."
if (( $EUID != 0 )); then
echo -e "${CYAN}Rode esse script usando root"
exit
fi
clear
instalartema(){
cd /var/www/
tar -cvf pterodactylbackup.tar.gz pterodactyl
echo -e "${CYAN}Instalando temas..."
cd /var/www/pterodactyl
rm -r pterodactylthemes
git clone https://github.com/CatValentine-Dev/pterodactylthemes.git
cd pterodactylthemes
rm /var/www/pterodactyl/resources/scripts/pterodactylthemes.css
rm /var/www/pterodactyl/resources/scripts/index.tsx
mv index.tsx /var/www/pterodactyl/resources/scripts/index.tsx
mv pterodactylthemes.css /var/www/pterodactyl/resources/scripts/pterodactylthemes.css
cd /var/www/pterodactyl
curl -sL https://deb.nodesource.com/setup_14.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
}
instaladordetemas(){
while true; do
read -p "Tem certeza de que deseja instalar o tema [y/n]? " yn
case $yn in
[Yy]* ) instalartema; break;;
[Nn]* ) exit;;
* ) echo "Por favor responda yes ou no.";;
esac
done
}
reparar(){
bash <(curl https://raw.githubusercontent.com/CatValentine-Dev/pterodactylthemes/main/reparar.sh)
}
voltar(){
bash <(curl https://raw.githubusercontent.com/CatValentine-Dev/pterodactylthemes/main/menu.sh)
}
restaurarbackup(){
echo "Restaurando Backup..."
cd /var/www/
tar -xvf pterodactylbackup.tar.gz
rm pterodactylthemes.tar.gz
cd /var/www/pterodactyl
yarn build:production
sudo php artisan optimize:clear
}
CYAN='\033[0;36m'
echo -e "${CYAN}Copyright (c) 2022 TemuxOS"
echo -e "${CYAN}Esse progama e um software livre, você pode modificar e distribuir sem problemas"
echo -e ""
echo -e "${CYAN}Discord: https://discord.gg/WkVVtTaBRh/"
echo -e ""
echo -e "${CYAN} [1] Instalar o Tema"
echo -e "${CYAN} [2] Restaurar backup"
echo -e "${CYAN} [3] Reparar Painel (Use caso tenha algo problema na instalação do temas)"
echo -e "${CYAN} [4] Voltar"
echo -e "${CYAN} [5] Sair"
read -p "Insira um numero: " choice
if [ $choice == "1" ]
then
instaladordetemas
fi
if [ $choice == "2" ]
then
restaurarbackup
fi
if [ $choice == "3" ]
then
reparar
fi
if [ $choice == "4" ]
then
voltar
fi
if [ $choice == "5" ]
then
exit
fi