2022-12-16 17:47:24 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
php artisan up
|
|
|
|
}
|
|
|
|
|
|
|
|
while true; do
|
2023-01-28 11:36:25 +00:00
|
|
|
read -p "Are you sure that you want to install the theme [y/n]? " yn
|
2022-12-16 17:47:24 +00:00
|
|
|
case $yn in
|
|
|
|
[Yy]* ) repairPanel; break;;
|
|
|
|
[Nn]* ) exit;;
|
2023-01-28 11:36:25 +00:00
|
|
|
* ) echo "Please answer yes or no.";;
|
2022-12-16 17:47:24 +00:00
|
|
|
esac
|
2023-01-28 11:36:25 +00:00
|
|
|
done
|