Skip to content

Commit f7593de

Browse files
committed
Theme for 0.7.19
1 parent bb71b9e commit f7593de

File tree

28 files changed

+4350
-0
lines changed

28 files changed

+4350
-0
lines changed

install.sh

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
########################################################
6+
#
7+
# Pterodactyl-AutoThemes Installation
8+
#
9+
# Created and maintained by Ferks-FK
10+
#
11+
# Protected by GPL 3.0 License
12+
#
13+
########################################################
14+
15+
SCRIPT_VERSION="v0.4"
16+
17+
18+
print_brake() {
19+
for ((n = 0; n < $1; n++)); do
20+
echo -n "#"
21+
done
22+
echo ""
23+
}
24+
25+
hyperlink() {
26+
echo -e "\e]8;;${1}\a${1}\e]8;;\a"
27+
}
28+
29+
#### Colors ####
30+
31+
GREEN="\e[0;92m"
32+
YELLOW="\033[1;33m"
33+
reset="\e[0m"
34+
red='\033[0;31m'
35+
36+
error() {
37+
COLOR_RED='\033[0;31m'
38+
COLOR_NC='\033[0m'
39+
40+
echo ""
41+
echo -e "* ${COLOR_RED}ERROR${COLOR_NC}: $1"
42+
echo ""
43+
}
44+
45+
46+
#### Check Sudo ####
47+
48+
if [[ $EUID -ne 0 ]]; then
49+
echo "* This script must be executed with root privileges (sudo)." 1>&2
50+
exit 1
51+
fi
52+
53+
54+
#### Check Curl ####
55+
56+
if ! [ -x "$(command -v curl)" ]; then
57+
echo "* curl is required in order for this script to work."
58+
echo "* install using apt (Debian and derivatives) or yum/dnf (CentOS)"
59+
exit 1
60+
fi
61+
62+
cancel() {
63+
echo
64+
echo -e "* ${red}Installation Canceled!${reset}"
65+
done=true
66+
exit 1
67+
}
68+
69+
done=false
70+
71+
echo
72+
print_brake 70
73+
echo "* Pterodactyl-AutoThemes Script @ $SCRIPT_VERSION"
74+
echo
75+
echo "* Copyright (C) 2021 - 2021, Ferks-FK."
76+
echo "* https://github.com/Ferks-FK/Pterodactyl-AutoThemes"
77+
echo
78+
echo "* This script is not associated with the official Pterodactyl Project."
79+
print_brake 70
80+
echo
81+
82+
Default() {
83+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version1.x/Default/build.sh)
84+
}
85+
86+
Dracula() {
87+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version1.x/Dracula/build.sh)
88+
}
89+
90+
Enola() {
91+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version1.x/Enola/build.sh)
92+
}
93+
94+
Twilight() {
95+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version1.x/Twilight/build.sh)
96+
}
97+
98+
BlackEndSpace() {
99+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/BlackEndSpace/build.sh)
100+
}
101+
102+
BlueBrick() {
103+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/BlueBrick/build.sh)
104+
}
105+
106+
LimeStitch() {
107+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/LimeStitch/build.sh)
108+
}
109+
110+
MinecraftMadness() {
111+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/MinecraftMadness/build.sh)
112+
}
113+
114+
NothingButGraphite() {
115+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/NothingButGraphite/build.sh)
116+
}
117+
118+
RedApe() {
119+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/RedApe/build.sh)
120+
}
121+
122+
TangoTwist() {
123+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/TangoTwist/build.sh)
124+
}
125+
126+
127+
while [ "$done" == false ]; do
128+
options=(
129+
"Back to default theme (Only 1.x)"
130+
"Install Dracula (Only 1.x)"
131+
"Install Enola (Only 1.x)"
132+
"Install Twilight (Only 1.x)"
133+
"Install Black End Space (Only 0.7.19)"
134+
"Install Blue Brick (Only 0.7.19)"
135+
"Install Lime Stitch (Only 0.7.19)"
136+
"Install Minecraft Madness (Only 0.7.19)"
137+
"Install Nothing But Graphite (Only 0.7.19)"
138+
"Install Red Ape (Only 0.7.19)"
139+
"Install Tango Twist (Only 0.7.19)"
140+
141+
142+
"Cancel Installation"
143+
)
144+
145+
actions=(
146+
"Default"
147+
"Dracula"
148+
"Enola"
149+
"Twilight"
150+
"BlackEndSpace"
151+
"BlueBrick"
152+
"LimeStitch"
153+
"MinecraftMadness"
154+
"NothingButGraphite"
155+
"RedApe"
156+
"TangoTwist"
157+
158+
159+
"cancel"
160+
)
161+
162+
echo "* Which theme do you want to install?"
163+
echo
164+
165+
for i in "${!options[@]}"; do
166+
echo "[$i] ${options[$i]}"
167+
done
168+
169+
echo
170+
echo -n "* Input 0-$((${#actions[@]} - 1)): "
171+
read -r action
172+
173+
[ -z "$action" ] && error "Input is required" && continue
174+
175+
valid_input=("$(for ((i = 0; i <= ${#actions[@]} - 1; i += 1)); do echo "${i}"; done)")
176+
[[ ! " ${valid_input[*]} " =~ ${action} ]] && error "Invalid option"
177+
[[ " ${valid_input[*]} " =~ ${action} ]] && done=true && eval "${actions[$action]}"
178+
done
2.21 MB
Binary file not shown.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
########################################################
6+
#
7+
# Pterodactyl-AutoThemes Installation
8+
#
9+
# Created and maintained by Ferks-FK
10+
#
11+
# Protected by GPL 3.0 License
12+
#
13+
########################################################
14+
15+
#### Variables ####
16+
SCRIPT_VERSION="v0.4"
17+
SUPPORT_LINK="https://discord.gg/buDBbSGJmQ"
18+
19+
20+
print_brake() {
21+
for ((n = 0; n < $1; n++)); do
22+
echo -n "#"
23+
done
24+
echo ""
25+
}
26+
27+
28+
hyperlink() {
29+
echo -e "\e]8;;${1}\a${1}\e]8;;\a"
30+
}
31+
32+
33+
#### Colors ####
34+
35+
GREEN="\e[0;92m"
36+
YELLOW="\033[1;33m"
37+
reset="\e[0m"
38+
39+
40+
#### OS check ####
41+
42+
check_distro() {
43+
if [ -f /etc/os-release ]; then
44+
. /etc/os-release
45+
OS=$(echo "$ID")
46+
OS_VER=$VERSION_ID
47+
elif type lsb_release >/dev/null 2>&1; then
48+
OS=$(lsb_release -si)
49+
OS_VER=$(lsb_release -sr)
50+
elif [ -f /etc/lsb-release ]; then
51+
. /etc/lsb-release
52+
OS=$(echo "$DISTRIB_ID")
53+
OS_VER=$DISTRIB_RELEASE
54+
elif [ -f /etc/debian_version ]; then
55+
OS="debian"
56+
OS_VER=$(cat /etc/debian_version)
57+
elif [ -f /etc/SuSe-release ]; then
58+
OS="SuSE"
59+
OS_VER="?"
60+
elif [ -f /etc/redhat-release ]; then
61+
OS="Red Hat/CentOS"
62+
OS_VER="?"
63+
else
64+
OS=$(uname -s)
65+
OS_VER=$(uname -r)
66+
fi
67+
68+
OS=$(echo "$OS")
69+
OS_VER_MAJOR=$(echo "$OS_VER" | cut -d. -f1)
70+
}
71+
72+
73+
#### Install Dependencies ####
74+
75+
dependencies() {
76+
echo
77+
print_brake 30
78+
echo -e "* ${GREEN}Installing dependencies...${reset}"
79+
print_brake 30
80+
echo
81+
case "$OS" in
82+
debian | ubuntu)
83+
apt-get install -y zip
84+
;;
85+
86+
centos)
87+
[ "$OS_VER_MAJOR" == "7" ] && yum install -y zip
88+
[ "$OS_VER_MAJOR" == "8" ] && dnf install -y zip
89+
;;
90+
esac
91+
}
92+
93+
94+
#### Panel Backup ####
95+
96+
backup() {
97+
echo
98+
print_brake 31
99+
echo -e "* ${GREEN}Performing security backup...${reset}"
100+
print_brake 31
101+
cd /var/www/pterodactyl
102+
zip -r PteroBackup-$(date +"%Y-%m-%d").zip public resources
103+
cd
104+
}
105+
106+
107+
#### Donwload Files ####
108+
109+
download_files() {
110+
print_brake 25
111+
echo -e "* ${GREEN}Downloading files...${reset}"
112+
print_brake 25
113+
cd /var/www/pterodactyl
114+
mkdir -p temp
115+
cd temp
116+
curl -sSLo BlackEndSpace.tar.gz https://raw.githubusercontent.com/Alok-NetWork/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/BlackEndSpace/BlackEndSpace.tar.gz
117+
tar -xzvf BlackEndSpace.tar.gz
118+
cd BlackEndSpace
119+
cp -rf -- * /var/www/pterodactyl
120+
cd
121+
cd /var/www/pterodactyl
122+
rm -rf temp
123+
}
124+
125+
126+
bye() {
127+
print_brake 50
128+
echo
129+
echo -e "* ${GREEN}The theme ${YELLOW}Black End Space${GREEN} was successfully installed.${reset}"
130+
echo -e "* ${GREEN}Thank you for using this script.${reset}"
131+
echo -e "* ${GREEN}Support group: $(hyperlink "$SUPPORT_LINK")${reset}"
132+
echo
133+
print_brake 50
134+
}
135+
136+
137+
#### Exec Script ####
138+
check_distro
139+
dependencies
140+
backup
141+
download_files
142+
bye
1.99 MB
Binary file not shown.

0 commit comments

Comments
 (0)