Skip to content

Commit 4188e15

Browse files
committed
Added Flanco Theme
1 parent 2c33585 commit 4188e15

File tree

3 files changed

+180
-1
lines changed

3 files changed

+180
-1
lines changed

install.sh

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

15-
SCRIPT_VERSION="v0.8.3"
15+
SCRIPT_VERSION="v0.8.4"
1616

1717

1818
print_brake() {
@@ -99,6 +99,10 @@ ZingTheme() {
9999
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version1.x/ZingTheme/build.sh)
100100
}
101101

102+
FlancoTheme() {
103+
bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version1.x/FlancoTheme/build.sh)
104+
}
105+
102106

103107
while [ "$done" == false ]; do
104108
options=(
@@ -107,6 +111,7 @@ while [ "$done" == false ]; do
107111
"Install Enola (Only 1.x)"
108112
"Install Twilight (Only 1.x)"
109113
"Install Zing Theme (Only 1.x)"
114+
"Install Flanco Theme (Only 1.x)"
110115

111116

112117
"Cancel Installation"
@@ -118,6 +123,7 @@ while [ "$done" == false ]; do
118123
"Enola"
119124
"Twilight"
120125
"ZingTheme"
126+
"FlancoTheme"
121127

122128

123129
"cancel"
2.57 KB
Binary file not shown.
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
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.8.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+
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - && apt-get install -y nodejs && apt-get install -y zip
84+
;;
85+
esac
86+
87+
if [ "$OS_VER_MAJOR" == "7" ]; then
88+
curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash - && sudo yum install -y nodejs yarn && sudo yum install -y zip
89+
fi
90+
91+
if [ "$OS_VER_MAJOR" == "8" ]; then
92+
curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash - && sudo dnf install -y nodejs && sudo dnf install -y zip
93+
fi
94+
}
95+
96+
97+
#### Panel Backup ####
98+
backup() {
99+
echo
100+
print_brake 32
101+
echo -e "* ${GREEN}Performing security backup...${reset}"
102+
print_brake 32
103+
if [ -f "/var/www/pterodactyl/PanelBackup/PanelBackup.zip" ]; then
104+
echo
105+
print_brake 45
106+
echo -e "* ${GREEN}There is already a backup, skipping step...${reset}"
107+
print_brake 45
108+
echo
109+
else
110+
cd /var/www/pterodactyl
111+
mkdir -p PanelBackup
112+
zip -r PanelBackup.zip app config public resources routes storage database .env tailwind.config.js
113+
mv PanelBackup.zip PanelBackup
114+
fi
115+
}
116+
117+
118+
#### Donwload Files ####
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 FlancoTheme.tar.gz https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes/${SCRIPT_VERSION}/themes/version1.x/FlancoTheme/FlancoTheme.tar.gz
127+
tar -xzvf FlancoTheme.tar.gz
128+
cd FlancoTheme
129+
cp -rf -- * /var/www/pterodactyl
130+
cd
131+
cd /var/www/pterodactyl
132+
rm -rf temp
133+
}
134+
135+
#### Panel Production ####
136+
137+
production() {
138+
DIR=/var/www/pterodactyl
139+
140+
if [ -d "$DIR" ]; then
141+
echo
142+
print_brake 25
143+
echo -e "* ${GREEN}Producing panel...${reset}"
144+
print_brake 25
145+
npm i -g yarn
146+
cd /var/www/pterodactyl
147+
yarn install
148+
yarn add @emotion/react
149+
yarn build:production
150+
fi
151+
}
152+
153+
154+
bye() {
155+
print_brake 50
156+
echo
157+
echo -e "* ${GREEN}The theme ${YELLOW}Flanco Theme${GREEN} was successfully installed."
158+
echo -e "* A security backup of your panel has been created."
159+
echo -e "* Thank you for using this script."
160+
echo -e "* Support group: ${YELLOW}$(hyperlink "$SUPPORT_LINK")${reset}"
161+
echo
162+
print_brake 50
163+
}
164+
165+
166+
#### Exec Script ####
167+
check_distro
168+
dependencies
169+
backup
170+
download_files
171+
production
172+
bye
173+

0 commit comments

Comments
 (0)