1
0
Fork 0

adjust install scripts | allow user to enter trusted proxies value

This commit is contained in:
saibotk 2019-07-29 02:23:34 +02:00
parent efb51d03b0
commit 6a2f0ba6fe
3 changed files with 13 additions and 10 deletions

View file

@ -1,5 +1,4 @@
# pterodactyl-panel-docker # Pterodactyl panel Docker container
[![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)
> Docker Compose configuration for the [Pterodactyl Panel](https://github.com/Pterodactyl/Panel). > 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 Pterodactyl is an open-source control panel used for hosting numerous game-related

View file

@ -12,13 +12,20 @@ fi
echo "Are you sure you want to continue the install script? (Y/n)" echo "Are you sure you want to continue the install script? (Y/n)"
read -n1 run read -n1 run
if [ "$run" = "y" ] || [ "$run" = "Y" ]; then if [ "$run" = "y" ] || [ "$run" = "Y" ] || [ "$run" = "" ]; then
echo "Running install script." echo "Running install script."
echo "Waiting 15 seconds for MariaDB to be ready." echo "Waiting 15 seconds for MariaDB to be ready."
sleep 15 sleep 15
echo "Adding additional parameters to .env file." echo "Configure trusted proxies (this will enable reverse proxy functionality)? (Y/n)"
printf "\n\nTRUSTED_PROXIES=*" >> .env 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 php artisan key:generate --force
echo "Running configuration scripts." echo "Running configuration scripts."

View file

@ -1,18 +1,15 @@
#!/bin/ash #!/bin/ash
##
# This is an install script to quickly upgrade Pterodactyl Panel. Before running,
# please BACK UP any important data!
##
if [ "$(whoami)" != "pterodactyl" ]; then if [ "$(whoami)" != "pterodactyl" ]; then
echo "Rerunning script as webserver user." echo "Rerunning script as webserver user."
exec su -c /usr/local/bin/upgrade pterodactyl exec su -c /usr/local/bin/upgrade pterodactyl
fi fi
echo "!!! PLEASE BACKUP ANY IMPORTANT DATA BEFORE UPGRADING !!!"
echo "Are you sure you want to continue the upgrade script? (Y/n)" echo "Are you sure you want to continue the upgrade script? (Y/n)"
read -n1 run read -n1 run
if [ "$run" = "Y" ]; then if [ "$run" = "y" ] || [ "$run" = "Y" ]; then
echo "Running upgrade script." echo "Running upgrade script."
php artisan down php artisan down