From f2cdfc9046c99607ef2fe8cc7734f99100676d21 Mon Sep 17 00:00:00 2001 From: purple Date: Sat, 6 May 2023 16:31:31 +0200 Subject: [PATCH] Fix notifications for custom folder Pterodactyl installations. --- blueprint.sh | 6 ++++-- resources/views/layouts/admin.blade.php | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/blueprint.sh b/blueprint.sh index 0abf30f..f44bacc 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -1,6 +1,7 @@ #!/bin/bash -# This should allow Blueprint to run in docker. +# This should allow Blueprint to run in docker. Please note that changing the $FOLDER variable after running +# the Blueprint installation script will not change anything in any files besides blueprint.sh. FOLDER="pterodactyl" if [[ -f ".dockerenv" ]]; then @@ -83,6 +84,7 @@ if [[ $1 != "-bash" ]]; then fi; sed -i "s!&bp.folder&!$FOLDER!g" /var/www/$FOLDER/app/Http/Services/Helpers/BlueprintPlaceholderService; + sed -i "s!&bp.folder&!$FOLDER!g" /var/www/$FOLDER/resources/views/layouts/admin.blade.php; clr_bright "php artisan down"; php artisan down; @@ -332,7 +334,7 @@ if [[ ( $2 == "-v" ) || ( $2 == "-version" ) ]]; then fi; if [[ $2 == "-init" ]]; then - error "-init is currently not available"; + error "-init is currently not available";exit 1; fi; if [[ $2 == "-reinstall" ]]; then diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index 668feec..eb3e567 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -58,7 +58,7 @@
  • -
  • +
  • @@ -158,22 +158,22 @@ @yield('content')

    Blueprint has now been installed, click the extension icon to take a look.

    "; - `cd /var/www/pterodactyl;rm .blueprint/.flags/onboarding.md;`; + `cd /var/www/&bp.folder&;rm .blueprint/.flags/onboarding.md;`; } - $notification = shell_exec("cd /var/www/pterodactyl;cat .blueprint/.storage/notification"); + $notification = shell_exec("cd /var/www/&bp.folder&;cat .blueprint/.storage/notification"); if($notification != null) { echo "

    ".$notification."

    "; - shell_exec("cd /var/www/pterodactyl;rm .blueprint/.storage/notification;touch .blueprint/.storage/notification;"); + shell_exec("cd /var/www/&bp.folder&;rm .blueprint/.storage/notification;touch .blueprint/.storage/notification;"); } ?>