Skip to content

Commit 185709b

Browse files
committed
Add Theme Argon
1 parent 31b13f5 commit 185709b

File tree

3 files changed

+160
-0
lines changed

3 files changed

+160
-0
lines changed

install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ TangoTwist() {
123123
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/TangoTwist/build.sh)
124124
}
125125

126+
Argon() {
127+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/Argon/build.sh)
128+
}
129+
126130

127131
while [ "$done" == false ]; do
128132
options=(
@@ -137,6 +141,7 @@ while [ "$done" == false ]; do
137141
"Install Nothing But Graphite (Only 0.7.19)"
138142
"Install Red Ape (Only 0.7.19)"
139143
"Install Tango Twist (Only 0.7.19)"
144+
"Install Argon (Only 0.7.19)"
140145

141146

142147
"Cancel Installation"
@@ -154,6 +159,7 @@ while [ "$done" == false ]; do
154159
"NothingButGraphite"
155160
"RedApe"
156161
"TangoTwist"
162+
"Argon"
157163

158164

159165
"cancel"
7.33 MB
Binary file not shown.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
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.5"
17+
ARGON="APP_THEME=argon"
18+
SUPPORT_LINK="https://discord.gg/buDBbSGJmQ"
19+
20+
21+
print_brake() {
22+
for ((n = 0; n < $1; n++)); do
23+
echo -n "#"
24+
done
25+
echo ""
26+
}
27+
28+
29+
hyperlink() {
30+
echo -e "\e]8;;${1}\a${1}\e]8;;\a"
31+
}
32+
33+
34+
#### Colors ####
35+
36+
GREEN="\e[0;92m"
37+
YELLOW="\033[1;33m"
38+
reset="\e[0m"
39+
40+
41+
#### OS check ####
42+
43+
check_distro() {
44+
if [ -f /etc/os-release ]; then
45+
. /etc/os-release
46+
OS=$(echo "$ID")
47+
OS_VER=$VERSION_ID
48+
elif type lsb_release >/dev/null 2>&1; then
49+
OS=$(lsb_release -si)
50+
OS_VER=$(lsb_release -sr)
51+
elif [ -f /etc/lsb-release ]; then
52+
. /etc/lsb-release
53+
OS=$(echo "$DISTRIB_ID")
54+
OS_VER=$DISTRIB_RELEASE
55+
elif [ -f /etc/debian_version ]; then
56+
OS="debian"
57+
OS_VER=$(cat /etc/debian_version)
58+
elif [ -f /etc/SuSe-release ]; then
59+
OS="SuSE"
60+
OS_VER="?"
61+
elif [ -f /etc/redhat-release ]; then
62+
OS="Red Hat/CentOS"
63+
OS_VER="?"
64+
else
65+
OS=$(uname -s)
66+
OS_VER=$(uname -r)
67+
fi
68+
69+
OS=$(echo "$OS")
70+
OS_VER_MAJOR=$(echo "$OS_VER" | cut -d. -f1)
71+
}
72+
73+
74+
#### Install Dependencies ####
75+
76+
dependencies() {
77+
echo
78+
print_brake 30
79+
echo -e "* ${GREEN}Installing dependencies...${reset}"
80+
print_brake 30
81+
echo
82+
case "$OS" in
83+
debian | ubuntu)
84+
apt-get install -y zip
85+
;;
86+
87+
centos)
88+
[ "$OS_VER_MAJOR" == "7" ] && yum install -y zip
89+
[ "$OS_VER_MAJOR" == "8" ] && dnf install -y zip
90+
;;
91+
esac
92+
}
93+
94+
95+
#### Panel Backup ####
96+
97+
backup() {
98+
echo
99+
print_brake 32
100+
echo -e "* ${GREEN}Performing security backup...${reset}"
101+
print_brake 32
102+
if [ -f "/var/www/pterodactyl/PanelBackup/PanelBackup.zip" ]; then
103+
echo
104+
print_brake 45
105+
echo -e "* ${GREEN}There is already a backup, skipping step...${reset}"
106+
print_brake 45
107+
echo
108+
else
109+
cd /var/www/pterodactyl
110+
mkdir -p PanelBackup
111+
zip -r PanelBackup.zip app config public resources routes storage database
112+
mv PanelBackup.zip PanelBackup
113+
fi
114+
}
115+
116+
117+
#### Donwload Files ####
118+
119+
download_files() {
120+
print_brake 25
121+
echo -e "* ${GREEN}Downloading files...${reset}"
122+
print_brake 25
123+
cd /var/www/pterodactyl
124+
mkdir -p temp
125+
cd temp
126+
curl -sSLo Argon.tar.gz https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version0.7.19/Argon/Argon.tar.gz
127+
tar -xzvf Argon.tar.gz
128+
cd Argon
129+
cp -rf -- * /var/www/pterodactyl
130+
cd
131+
cd /var/www/pterodactyl
132+
rm -rf temp
133+
sed -i -e "s@APP_THEME=pterodactyl@${ARGON}@g" .env
134+
}
135+
136+
137+
bye() {
138+
print_brake 50
139+
echo
140+
echo -e "* ${GREEN}The theme ${YELLOW}Argon${GREEN} was successfully installed."
141+
echo -e "* A security backup of your panel has been created."
142+
echo -e "* Thank you for using this script."
143+
echo -e "* Support group: ${YELLOW}$(hyperlink "$SUPPORT_LINK")${reset}"
144+
echo
145+
print_brake 50
146+
}
147+
148+
149+
#### Exec Script ####
150+
check_distro
151+
dependencies
152+
backup
153+
download_files
154+
bye

0 commit comments

Comments
 (0)