IceMinecraftTheme/repair.sh
2023-01-28 12:36:25 +01:00

40 lines
803 B
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
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