diff --git a/README.md b/README.md index 9a7227d..2a1b14e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -# pterodactyl-panel-docker -[![GitHub release](https://img.shields.io/github/release/TehTotalPwnage/pterodactyl-panel-docker.svg?style=for-the-badge)](https://github.com/TehTotalPwnage/pterodactyl-panel-docker/releases) +# Pterodactyl panel Docker container > Docker Compose configuration for the [Pterodactyl Panel](https://github.com/Pterodactyl/Panel). Pterodactyl is an open-source control panel used for hosting numerous game-related diff --git a/services/php/install.sh b/services/php/install.sh index 2b8f61b..af35f76 100755 --- a/services/php/install.sh +++ b/services/php/install.sh @@ -12,13 +12,20 @@ fi echo "Are you sure you want to continue the install script? (Y/n)" read -n1 run -if [ "$run" = "y" ] || [ "$run" = "Y" ]; then +if [ "$run" = "y" ] || [ "$run" = "Y" ] || [ "$run" = "" ]; then echo "Running install script." echo "Waiting 15 seconds for MariaDB to be ready." sleep 15 - echo "Adding additional parameters to .env file." - printf "\n\nTRUSTED_PROXIES=*" >> .env + echo "Configure trusted proxies (this will enable reverse proxy functionality)? (Y/n)" + read -n1 configureTP + if [ "$configureTP" = "y" ] || [ "$configureTP" = "Y" ] || [ "$run" = "" ]; then + echo "Please enter a value (comma separated list of allowed IPs, * to allow all) for TRUSTED_PROXIES: [*]" + read -n1 configureTPval + if [ "$configureTPval" = "" ]; then + configureTPval="*" + printf "\n\nTRUSTED_PROXIES=$configureTPval" >> .env + fi php artisan key:generate --force echo "Running configuration scripts." diff --git a/services/php/upgrade.sh b/services/php/upgrade.sh index b1f3745..1d4f9bd 100644 --- a/services/php/upgrade.sh +++ b/services/php/upgrade.sh @@ -1,18 +1,15 @@ #!/bin/ash -## -# This is an install script to quickly upgrade Pterodactyl Panel. Before running, -# please BACK UP any important data! -## if [ "$(whoami)" != "pterodactyl" ]; then echo "Rerunning script as webserver user." exec su -c /usr/local/bin/upgrade pterodactyl fi +echo "!!! PLEASE BACKUP ANY IMPORTANT DATA BEFORE UPGRADING !!!" echo "Are you sure you want to continue the upgrade script? (Y/n)" read -n1 run -if [ "$run" = "Y" ]; then +if [ "$run" = "y" ] || [ "$run" = "Y" ]; then echo "Running upgrade script." php artisan down