Fix indentation on VariableService and fix installation check.
Now the installation will be marked as installed after the installation script ends.
This commit is contained in:
parent
9243e01498
commit
a52ec1a3c1
4 changed files with 45 additions and 35 deletions
|
@ -22,4 +22,10 @@ class BlueprintPlaceholderService
|
||||||
$v = "&bp.folder&";
|
$v = "&bp.folder&";
|
||||||
return $v;
|
return $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// installed()
|
||||||
|
public function installed(): string {
|
||||||
|
$v = "NOTINSTALLED";
|
||||||
|
return $v;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ class BlueprintVariableService
|
||||||
|
|
||||||
|
|
||||||
// $bp->serve()
|
// $bp->serve()
|
||||||
|
// $bp->isInstalled()
|
||||||
// $bp->version()
|
// $bp->version()
|
||||||
// $bp->dbGet('db::record')
|
// $bp->dbGet('db::record')
|
||||||
// $bp->dbSet('db::record', 'value')
|
// $bp->dbSet('db::record', 'value')
|
||||||
|
@ -27,6 +28,10 @@ class BlueprintVariableService
|
||||||
return $this->blueprintplaceholderservice->version();
|
return $this->blueprintplaceholderservice->version();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isInstalled(): string {
|
||||||
|
return $this->blueprintplaceholderservice->installed();
|
||||||
|
}
|
||||||
|
|
||||||
public function dbGet($key): string {
|
public function dbGet($key): string {
|
||||||
$a = $this->settings->get("blueprint::".$key);
|
$a = $this->settings->get("blueprint::".$key);
|
||||||
if (!$a) {
|
if (!$a) {
|
||||||
|
@ -36,14 +41,12 @@ class BlueprintVariableService
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dbSet($key, $value): void
|
public function dbSet($key, $value): void {
|
||||||
{
|
|
||||||
$this->settings->set('blueprint::' . $key, $value);
|
$this->settings->set('blueprint::' . $key, $value);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exec($arg): string|null
|
public function exec($arg): string|null {
|
||||||
{
|
|
||||||
return shell_exec("cd /var/www/".$this->blueprintplaceholderservice->folder().";bash blueprint.sh -exec ".$arg);
|
return shell_exec("cd /var/www/".$this->blueprintplaceholderservice->folder().";bash blueprint.sh -exec ".$arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,7 @@ if [[ $1 != "-bash" ]]; then
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
dbAdd "blueprint.setupFinished";
|
dbAdd "blueprint.setupFinished";
|
||||||
|
sed -i "s!NOTINSTALLED!INSTALLED!g" /var/www/$FOLDER/app/Services/Helpers/BlueprintPlaceholderService.php;
|
||||||
exit 1;
|
exit 1;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@if($bp->version() != "&bp.version&")
|
@if($bp->isInstalled() != "NOTINSTALLED")
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-3 text-center">
|
<div class="col-xs-6 col-sm-3 text-center">
|
||||||
<a href="{{ route('admin.extensions.blueprint.index') }}"><button class="btn btn-gray" style="width:100%;margin-bottom:17px;"><img src="/assets/extensions/blueprint/logo.jpg" alt="logo" class="img-btn"> Blueprint <small>{{ $bp->version() }}</small></button></a>
|
<a href="{{ route('admin.extensions.blueprint.index') }}"><button class="btn btn-gray" style="width:100%;margin-bottom:17px;"><img src="/assets/extensions/blueprint/logo.jpg" alt="logo" class="img-btn"> Blueprint <small>{{ $bp->version() }}</small></button></a>
|
||||||
|
|
Loading…
Reference in a new issue