All files normally placed in .flags will now be located in .storage.

This commit is contained in:
purple 2023-05-09 17:52:08 +02:00
parent 32899cc903
commit b4e5e76f83
3 changed files with 8 additions and 8 deletions

View file

@ -18,22 +18,22 @@ fi;
if [[ -d "/var/www/$FOLDER/blueprint" ]]; then mv /var/www/$FOLDER/blueprint /var/www/$FOLDER/.blueprint; fi;
# BUILT_FROM_SOURCE="y"; # If you downloaded Blueprint from a release instead of building it, this should be "n".
if [[ $BUILT_FROM_SOURCE == "y" ]]; then if [[ ! -f "/var/www/$FOLDER/.blueprint/.flags/versionschemefix.flag" ]]; then sed -E -i "s*&bp.version&*source*g" app/Services/Helpers/BlueprintPlaceholderService.php;touch /var/www/$FOLDER/.blueprint/.flags/versionschemefix.flag;fi;VERSION="source";
if [[ $BUILT_FROM_SOURCE == "y" ]]; then if [[ ! -f "/var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag" ]]; then sed -E -i "s*&bp.version&*source*g" app/Services/Helpers/BlueprintPlaceholderService.php;touch /var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag;fi;VERSION="source";
elif [[ $PM_VERSION == "([(pterodactylmarket""_version)])" ]]; then
# This runs when the placeholder has not changed, indicating an issue with PterodactylMarket
# or Blueprint being installed from other sources.
if [[ ! -f "/var/www/$FOLDER/.blueprint/.flags/versionschemefix.flag" ]]; then
if [[ ! -f "/var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag" ]]; then
sed -E -i "s*&bp.version&*$VER_FALLBACK*g" app/Services/Helpers/BlueprintPlaceholderService.php;
touch /var/www/$FOLDER/.blueprint/.flags/versionschemefix.flag;
touch /var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag;
fi;
VERSION=$VER_FALLBACK;
elif [[ $PM_VERSION != "([(pterodactylmarket""_version)])" ]]; then
# This runs in case it is possible to use the PterodactylMarket placeholder instead of the
# fallback version.
if [[ ! -f "/var/www/$FOLDER/.blueprint/.flags/versionschemefix.flag" ]]; then
if [[ ! -f "/var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag" ]]; then
sed -E -i "s*&bp.version&*$PM_VERSION*g" app/Services/Helpers/BlueprintPlaceholderService.php;
touch /var/www/$FOLDER/.blueprint/.flags/versionschemefix.flag;
touch /var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag;
fi;
VERSION=$PM_VERSION;

View file

@ -58,7 +58,7 @@
</a>
</li>
<li>
<li><a href="{{ route('admin.extensions') }}" data-toggle="tooltip" data-placement="bottom" title="Extensions"><i class='fa fa-puzzle-piece <?php if(shell_exec("cd /var/www/&bp.folder&;cat .blueprint/.flags/onboarding.md") == "*blueprint*"){ echo "bx-flashing"; } ?>'></i></a></li>
<li><a href="{{ route('admin.extensions') }}" data-toggle="tooltip" data-placement="bottom" title="Extensions"><i class='fa fa-puzzle-piece <?php if(shell_exec("cd /var/www/&bp.folder&;cat .blueprint/.storage/onboarding.md") == "*blueprint*"){ echo "bx-flashing"; } ?>'></i></a></li>
</li>
<li>
<li><a href="{{ route('index') }}" data-toggle="tooltip" data-placement="bottom" title="Exit Admin Control"><i class="fa fa-server"></i></a></li>
@ -158,12 +158,12 @@
@yield('content')
<?php
if(shell_exec("cd /var/www/&bp.folder&;cat .blueprint/.flags/onboarding.md") == "*blueprint*") {
if(shell_exec("cd /var/www/&bp.folder&;cat .blueprint/.storage/onboarding.md") == "*blueprint*") {
echo "
<div class=\"notification\">
<p>Blueprint has now been installed, click the extension icon to take a look.</p>
</div>";
`cd /var/www/&bp.folder&;rm .blueprint/.flags/onboarding.md;`;
`cd /var/www/&bp.folder&;rm .blueprint/.storage/onboarding.md;`;
}
$notification = shell_exec("cd /var/www/&bp.folder&;cat .blueprint/.storage/notification");