Created
April 2, 2023 14:27
-
-
Save Mageas/058f6c21a9f22af21f4a58e9b1c18ffc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://github.com/IceroDev/pterodactyl-update | |
PANEL_UPDATE="https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz" | |
function main { | |
if [ -d "/var/www/pterodactyl/" ]; then | |
echo -e -n "* Do you want proceed to update your panel? (y/N): " | |
read -r CONFIRM_PROCEED | |
if [[ ! "$CONFIRM_PROCEED" =~ [Yy] ]]; then | |
print_error "Updating abort!" | |
exit 1 | |
fi | |
fi | |
} | |
function update_panel() { | |
if [ -d "/var/www/pterodactyl/" ]; then | |
cd "/var/www/pterodactyl/" | |
curl -L $PANEL_UPDATE | tar -xzv | |
sleep 5 | |
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 * | |
echo "Panel Updated" | |
fi | |
} | |
main | |
update_panel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment