forked from Angelillo15/MinecraftPurpleTheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
repair.sh
55 lines (34 loc) · 1020 Bytes
/
repair.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
if (( $EUID != 0 )); then
echo "Please run as root"
exit
fi
repairPanel(){
cd /var/www/pterodactyl
php artisan down
rm -r /var/www/pterodactyl/resources
curl -L https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz | tar -xzv
chmod -R 755 storage/* bootstrap/cache
composer install --no-dev --optimize-autoloader
php artisan view:clear
php artisan config:clear
php artisan migrate --seed --force
chown -R www-data:www-data /var/www/pterodactyl/*
php artisan queue:restart
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
apt update
apt install -y nodejs
npm i -g yarn
yarn
yarn build:production
sudo php artisan optimize:clear
php artisan up
}
while true; do
read -p "Are you sure that you want to install the theme [y/n]? " yn
case $yn in
[Yy]* ) repairPanel; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done