Skip to content

Commit 88e9e76

Browse files
committed
Update
1 parent 96a0bc6 commit 88e9e76

File tree

7 files changed

+279
-52
lines changed

7 files changed

+279
-52
lines changed

backup.sh

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,29 @@ YELLOW="\033[1;33m"
4444
reset="\e[0m"
4545
red='\033[0;31m'
4646

47+
#### Find where pterodactyl is installed ####
48+
49+
find_pterodactyl() {
50+
echo
51+
print_brake 47
52+
echo -e "* ${GREEN}Looking for your pterodactyl installation...${reset}"
53+
print_brake 47
54+
echo
55+
sleep 2
56+
if [ -d "/var/www/pterodactyl" ]; then
57+
PTERO_INSTALL=true
58+
PTERO="/var/www/pterodactyl"
59+
elif [ -d "/var/www/panel" ]; then
60+
PTERO_INSTALL=true
61+
PTERO="/var/www/panel"
62+
elif [ -d "/var/www/ptero" ]; then
63+
PTERO_INSTALL=true
64+
PTERO="/var/www/ptero"
65+
else
66+
PTERO_INSTALL=false
67+
fi
68+
}
69+
4770

4871
#### Deletes all files installed by the script ####
4972

@@ -102,6 +125,21 @@ print_brake 50
102125

103126

104127
#### Exec Script ####
105-
delete_files
106-
restore
107-
bye
128+
find_pterodactyl
129+
if [ "$PTERO_INSTALL" == true ]; then
130+
echo
131+
print_brake 60
132+
echo -e "* ${GREEN}Installation of the panel found, continuing the backup...${reset}"
133+
print_brake 60
134+
echo
135+
delete_files
136+
restore
137+
bye
138+
elif [ "$PTERO_INSTALL" == false ]; then
139+
echo
140+
print_brake 66
141+
echo -e "* ${red}The installation of your panel could not be located, aborting...${reset}"
142+
print_brake 66
143+
echo
144+
exit 1
145+
fi

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.7"
15+
SCRIPT_VERSION="v0.8.8"
1616

1717

1818
print_brake() {

themes/version1.x/Dracula/build.sh

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ set -e
1515

1616
#### Variables ####
1717

18-
SCRIPT_VERSION="v0.8.7"
18+
SCRIPT_VERSION="v0.8.8"
1919
SUPPORT_LINK="https://discord.gg/buDBbSGJmQ"
2020
PTERO="/var/www/pterodactyl"
2121

@@ -73,6 +73,29 @@ check_distro() {
7373
OS_VER_MAJOR=$(echo "$OS_VER" | cut -d. -f1)
7474
}
7575

76+
#### Find where pterodactyl is installed ####
77+
78+
find_pterodactyl() {
79+
echo
80+
print_brake 47
81+
echo -e "* ${GREEN}Looking for your pterodactyl installation...${reset}"
82+
print_brake 47
83+
echo
84+
sleep 2
85+
if [ -d "/var/www/pterodactyl" ]; then
86+
PTERO_INSTALL=true
87+
PTERO="/var/www/pterodactyl"
88+
elif [ -d "/var/www/panel" ]; then
89+
PTERO_INSTALL=true
90+
PTERO="/var/www/panel"
91+
elif [ -d "/var/www/ptero" ]; then
92+
PTERO_INSTALL=true
93+
PTERO="/var/www/ptero"
94+
else
95+
PTERO_INSTALL=false
96+
fi
97+
}
98+
7699
#### Verify Compatibility ####
77100

78101
compatibility() {
@@ -83,9 +106,9 @@ print_brake 57
83106
echo
84107
sleep 2
85108
DIR="$PTERO/config/app.php"
86-
CODE=" 'version' => '1.6.6',"
109+
VERSION="1.6.6"
87110
if [ -f "$DIR" ]; then
88-
VERSION=$(cat "$DIR" | grep -n ^ | grep ^12: | cut -d: -f2)
111+
CODE=$(cat "$DIR" | grep -n ^ | grep ^12: | cut -d: -f2 | cut -c18-23 | sed "s/'//g")
89112
if [ "$VERSION" == "$CODE" ]; then
90113
echo
91114
print_brake 23
@@ -223,10 +246,25 @@ print_brake 50
223246

224247
#### Exec Script ####
225248
check_distro
226-
compatibility
227-
dependencies
228-
backup
229-
download_files
230-
configure
231-
production
232-
bye
249+
find_pterodactyl
250+
if [ "$PTERO_INSTALL" == true ]; then
251+
echo
252+
print_brake 66
253+
echo -e "* ${GREEN}Installation of the panel found, continuing the installation...${reset}"
254+
print_brake 66
255+
echo
256+
compatibility
257+
dependencies
258+
backup
259+
download_files
260+
configure
261+
production
262+
bye
263+
elif [ "$PTERO_INSTALL" == false ]; then
264+
echo
265+
print_brake 66
266+
echo -e "* ${red}The installation of your panel could not be located, aborting...${reset}"
267+
print_brake 66
268+
echo
269+
exit 1
270+
fi

themes/version1.x/Enola/build.sh

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ set -e
1515

1616
#### Variables ####
1717

18-
SCRIPT_VERSION="v0.8.7"
18+
SCRIPT_VERSION="v0.8.8"
1919
SUPPORT_LINK="https://discord.gg/buDBbSGJmQ"
2020
PTERO="/var/www/pterodactyl"
2121

@@ -73,6 +73,29 @@ check_distro() {
7373
OS_VER_MAJOR=$(echo "$OS_VER" | cut -d. -f1)
7474
}
7575

76+
#### Find where pterodactyl is installed ####
77+
78+
find_pterodactyl() {
79+
echo
80+
print_brake 47
81+
echo -e "* ${GREEN}Looking for your pterodactyl installation...${reset}"
82+
print_brake 47
83+
echo
84+
sleep 2
85+
if [ -d "/var/www/pterodactyl" ]; then
86+
PTERO_INSTALL=true
87+
PTERO="/var/www/pterodactyl"
88+
elif [ -d "/var/www/panel" ]; then
89+
PTERO_INSTALL=true
90+
PTERO="/var/www/panel"
91+
elif [ -d "/var/www/ptero" ]; then
92+
PTERO_INSTALL=true
93+
PTERO="/var/www/ptero"
94+
else
95+
PTERO_INSTALL=false
96+
fi
97+
}
98+
7699
#### Verify Compatibility ####
77100

78101
compatibility() {
@@ -83,9 +106,9 @@ print_brake 57
83106
echo
84107
sleep 2
85108
DIR="$PTERO/config/app.php"
86-
CODE=" 'version' => '1.6.6',"
109+
VERSION="1.6.6"
87110
if [ -f "$DIR" ]; then
88-
VERSION=$(cat "$DIR" | grep -n ^ | grep ^12: | cut -d: -f2)
111+
CODE=$(cat "$DIR" | grep -n ^ | grep ^12: | cut -d: -f2 | cut -c18-23 | sed "s/'//g")
89112
if [ "$VERSION" == "$CODE" ]; then
90113
echo
91114
print_brake 23
@@ -223,10 +246,25 @@ print_brake 50
223246

224247
#### Exec Script ####
225248
check_distro
226-
compatibility
227-
dependencies
228-
backup
229-
download_files
230-
configure
231-
production
232-
bye
249+
find_pterodactyl
250+
if [ "$PTERO_INSTALL" == true ]; then
251+
echo
252+
print_brake 66
253+
echo -e "* ${GREEN}Installation of the panel found, continuing the installation...${reset}"
254+
print_brake 66
255+
echo
256+
compatibility
257+
dependencies
258+
backup
259+
download_files
260+
configure
261+
production
262+
bye
263+
elif [ "$PTERO_INSTALL" == false ]; then
264+
echo
265+
print_brake 66
266+
echo -e "* ${red}The installation of your panel could not be located, aborting...${reset}"
267+
print_brake 66
268+
echo
269+
exit 1
270+
fi

themes/version1.x/FlancoTheme/build.sh

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set -e
1414
########################################################
1515

1616
#### Variables ####
17-
SCRIPT_VERSION="v0.8.7"
17+
SCRIPT_VERSION="v0.8.8"
1818
SUPPORT_LINK="https://discord.gg/buDBbSGJmQ"
1919
PTERO="/var/www/pterodactyl"
2020

@@ -72,6 +72,28 @@ check_distro() {
7272
OS_VER_MAJOR=$(echo "$OS_VER" | cut -d. -f1)
7373
}
7474

75+
#### Find where pterodactyl is installed ####
76+
77+
find_pterodactyl() {
78+
echo
79+
print_brake 47
80+
echo -e "* ${GREEN}Looking for your pterodactyl installation...${reset}"
81+
print_brake 47
82+
echo
83+
sleep 2
84+
if [ -d "/var/www/pterodactyl" ]; then
85+
PTERO_INSTALL=true
86+
PTERO="/var/www/pterodactyl"
87+
elif [ -d "/var/www/panel" ]; then
88+
PTERO_INSTALL=true
89+
PTERO="/var/www/panel"
90+
elif [ -d "/var/www/ptero" ]; then
91+
PTERO_INSTALL=true
92+
PTERO="/var/www/ptero"
93+
else
94+
PTERO_INSTALL=false
95+
fi
96+
}
7597

7698
#### Verify Compatibility ####
7799

@@ -83,9 +105,9 @@ print_brake 57
83105
echo
84106
sleep 2
85107
DIR="$PTERO/config/app.php"
86-
CODE=" 'version' => '1.6.6',"
108+
VERSION="1.6.6"
87109
if [ -f "$DIR" ]; then
88-
VERSION=$(cat "$DIR" | grep -n ^ | grep ^12: | cut -d: -f2)
110+
CODE=$(cat "$DIR" | grep -n ^ | grep ^12: | cut -d: -f2 | cut -c18-23 | sed "s/'//g")
89111
if [ "$VERSION" == "$CODE" ]; then
90112
echo
91113
print_brake 23
@@ -214,10 +236,25 @@ print_brake 50
214236

215237
#### Exec Script ####
216238
check_distro
217-
compatibility
218-
dependencies
219-
backup
220-
download_files
221-
production
222-
bye
239+
find_pterodactyl
240+
if [ "$PTERO_INSTALL" == true ]; then
241+
echo
242+
print_brake 66
243+
echo -e "* ${GREEN}Installation of the panel found, continuing the installation...${reset}"
244+
print_brake 66
245+
echo
246+
compatibility
247+
dependencies
248+
backup
249+
download_files
250+
production
251+
bye
252+
elif [ "$PTERO_INSTALL" == false ]; then
253+
echo
254+
print_brake 66
255+
echo -e "* ${red}The installation of your panel could not be located, aborting...${reset}"
256+
print_brake 66
257+
echo
258+
exit 1
259+
fi
223260

0 commit comments

Comments
 (0)