Skip to content

Commit 96a0bc6

Browse files
committed
Update the entire script.
1 parent f0beb38 commit 96a0bc6

File tree

23 files changed

+294
-4773
lines changed

23 files changed

+294
-4773
lines changed

backup.sh

Lines changed: 35 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ set -e
1515
#### Variables ####
1616
SUPPORT_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

1927
print_brake() {
2028
for ((n = 0; n < $1; n++)); do
@@ -37,55 +45,24 @@ reset="\e[0m"
3745
red='\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"
5657
fi
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"
8864
fi
65+
#### THEME ZINGTHEME ####
8966
}
9067

9168

@@ -97,26 +74,18 @@ print_brake 35
9774
echo -e "* ${GREEN}Checking for a backup...${reset}"
9875
print_brake 35
9976
echo
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
12089
fi
12190
}
12291

@@ -133,8 +102,6 @@ print_brake 50
133102

134103

135104
#### Exec Script ####
136-
DET
137-
zing
138-
argon
105+
delete_files
139106
restore
140107
bye

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set -e
1212
#
1313
########################################################
1414

15-
SCRIPT_VERSION="v0.8.6"
15+
SCRIPT_VERSION="v0.8.7"
1616

1717

1818
print_brake() {
5.61 KB
Binary file not shown.

themes/version1.x/Dracula/admin.blade.php

Lines changed: 0 additions & 211 deletions
This file was deleted.

0 commit comments

Comments
 (0)