forked from urvishpatelce/lxd-app
fix
This commit is contained in:
@ -27,7 +27,6 @@ $lxd = new LxdService();
|
||||
|
||||
// === Helper URLs ===
|
||||
$redirectBase = parseUrl("$host/app");
|
||||
$waitingPage = parseUrl("$host/app/waiting?name=$container&redirect=" . urlencode(getFullUrl()));
|
||||
// === If container is missing or invalid ===
|
||||
if (!$container || !$lxd->containerExists($container)) {
|
||||
redirect($redirectBase);
|
||||
@ -44,8 +43,8 @@ if ($state !== 'Running') {
|
||||
$nginx = $lxd->getContainerServiceStatus($container, 'nginx');
|
||||
$mysql = $lxd->getContainerServiceStatus($container, 'mariadb');
|
||||
|
||||
if (!$ip || $nginx !== 'active' || $mysql !== 'active') {
|
||||
redirect($waitingPage);
|
||||
if ($nginx !== 'active' || $mysql !== 'active') {
|
||||
redirect($redirectBase);
|
||||
}
|
||||
|
||||
// === Proxy to container ===
|
||||
|
||||
Reference in New Issue
Block a user