@@ -15,6 +15,14 @@ set -e
1515# ### Variables ####
1616SUPPORT_LINK=" https://discord.gg/buDBbSGJmQ"
1717
18+ # ### ADDONS FILES ####
19+
20+ PTERO=" /var/www/pterodactyl"
21+ DET=" $PTERO /resources/scripts/user.css"
22+ ZING=" $PTERO /resources/scripts/components/SidePanel.tsx"
23+
24+ # ### ADDONS FILES ####
25+
1826
1927print_brake () {
2028 for (( n = 0 ; n < $1 ; n++ )) ; do
@@ -37,55 +45,24 @@ reset="\e[0m"
3745red=' \033[0;31m'
3846
3947
40- # ### Removal of theme files ####
48+ # ### Deletes all files installed by the script ####
4149
42- DET () {
43- if [ -f " /var/www/pterodactyl/resources/scripts/user.css" ]; then
44- cd /var/www/pterodactyl/resources/scripts
45- rm -r user.css
46- cd
47- else
48- echo
49- fi
50- if [ -f " /var/www/pterodactyl/public/themes/pterodactyl/css/admin.css" ]; then
51- cd /var/www/pterodactyl/public/themes/pterodactyl/css
52- rm -r admin.css
53- cd
54- else
55- echo
50+ delete_files () {
51+ # ### THEMES DRACULA, ENOLA AND TWILIGHT ####
52+ if [ -f " $DET " ]; then
53+ rm -r " $DET "
54+ rm -r " $PTERO /public/themes/pterodactyl/css/admin.css"
55+ sed -i ' 6d' " $PTERO /resources/scripts/index.tsx"
56+ sed -i ' 33d' " $PTERO /resources/views/layouts/admin.blade.php"
5657fi
57- }
58+ # ### THEMES DRACULA, ENOLA AND TWILIGHT ####
5859
59- zing () {
60- if [ -f " /var/www/pterodactyl/resources/scripts/components/SidePanel.tsx" ]; then
61- cd /var/www/pterodactyl/resources/scripts/components
62- rm -r SidePanel.tsx
63- cd
64- else
65- echo
66- fi
67- if [ -f " /var/www/pterodactyl/resources/scripts/components/server/files/FileViewer.tsx" ]; then
68- cd /var/www/pterodactyl/resources/scripts/components/server/files
69- rm -r FileViewer.tsx
70- cd
71- else
72- echo
73- fi
74- }
75-
76- argon () {
77- if [ -d " /var/www/pterodactyl/public/themes/argon" ]; then
78- cd /var/www/pterodactyl/public/themes
79- rm -R argon
80- else
81- echo
82- fi
83- if [ -d " /var/www/pterodactyl/resources/themes/argon" ]; then
84- cd /var/www/pterodactyl/resources/themes
85- rm -R argon
86- else
87- echo
60+ # ### THEME ZINGTHEME ####
61+ if [ -f " $ZING " ]; then
62+ rm -r " $ZING "
63+ rm -r " $PTERO /resources/scripts/components/server/files/FileViewer.tsx"
8864fi
65+ # ### THEME ZINGTHEME ####
8966}
9067
9168
@@ -97,26 +74,18 @@ print_brake 35
9774echo -e " * ${GREEN} Checking for a backup...${reset} "
9875print_brake 35
9976echo
100- if [ -f " /var/www/pterodactyl/PanelBackup/PanelBackup.zip" ]; then
101- cd /var/www/pterodactyl/PanelBackup
102- unzip PanelBackup.zip
103- rm -R PanelBackup.zip
104- cp -rf app config database public resources routes storage .env /var/www/pterodactyl
105- cd
106- else
107- print_brake 45
108- echo -e " * ${red} There was no backup to restore, Aborting...${reset} "
109- print_brake 45
110- echo
111- exit 1
112- fi
113- if [ -f " /var/www/pterodactyl/PanelBackup/tailwind.config.js" ]; then
114- cd /var/www/pterodactyl/PanelBackup
115- cp -rf tailwind.config.js /var/www/pterodactyl
116- cd ..
117- rm -rf PanelBackup
118- else
119- echo
77+ if [ -f " $PTERO /PanelBackup/PanelBackup.zip" ]; then
78+ cd " $PTERO /PanelBackup"
79+ unzip PanelBackup.zip
80+ rm -R PanelBackup.zip
81+ cp -r -- * .env " $PTERO "
82+ rm -r " $PTERO /PanelBackup"
83+ else
84+ print_brake 45
85+ echo -e " * ${red} There was no backup to restore, Aborting...${reset} "
86+ print_brake 45
87+ echo
88+ exit 1
12089fi
12190}
12291
@@ -133,8 +102,6 @@ print_brake 50
133102
134103
135104# ### Exec Script ####
136- DET
137- zing
138- argon
105+ delete_files
139106restore
140107bye
0 commit comments