Updates, fixes, etc
This commit is contained in:
parent
fafe3f61c0
commit
2274013221
|
@ -51,5 +51,60 @@ class AppServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
return $ok;
|
return $ok;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//only run if the installer has been executed
|
||||||
|
if (file_exists(public_path()."/install/install.lock")) {
|
||||||
|
$settings = Settings::all();
|
||||||
|
// Set all configs from database
|
||||||
|
foreach ($settings as $setting) {
|
||||||
|
config([$setting->key => $setting->value]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set Mail Config
|
||||||
|
//only update config if mail settings have changed in DB
|
||||||
|
if (
|
||||||
|
config('mail.default') != config('SETTINGS:MAIL:MAILER') ||
|
||||||
|
config('mail.mailers.smtp.host') != config('SETTINGS:MAIL:HOST') ||
|
||||||
|
config('mail.mailers.smtp.port') != config('SETTINGS:MAIL:PORT') ||
|
||||||
|
config('mail.mailers.smtp.username') != config('SETTINGS:MAIL:USERNAME') ||
|
||||||
|
config('mail.mailers.smtp.password') != config('SETTINGS:MAIL:PASSWORD') ||
|
||||||
|
config('mail.mailers.smtp.encryption') != config('SETTINGS:MAIL:ENCRYPTION') ||
|
||||||
|
config('mail.from.address') != config('SETTINGS:MAIL:FROM_ADDRESS') ||
|
||||||
|
config('mail.from.name') != config('SETTINGS:MAIL:FROM_NAME')
|
||||||
|
) {
|
||||||
|
config(['mail.default' => config('SETTINGS::MAIL:MAILER')]);
|
||||||
|
config(['mail.mailers.smtp' => [
|
||||||
|
'transport' => 'smtp',
|
||||||
|
'host' => config('SETTINGS::MAIL:HOST'),
|
||||||
|
'port' => config('SETTINGS::MAIL:PORT'),
|
||||||
|
'encryption' => config('SETTINGS::MAIL:ENCRYPTION'),
|
||||||
|
'username' => config('SETTINGS::MAIL:USERNAME'),
|
||||||
|
'password' => config('SETTINGS::MAIL:PASSWORD'),
|
||||||
|
'timeout' => null,
|
||||||
|
'auth_mode' => null,
|
||||||
|
]]);
|
||||||
|
config(['mail.from' => ['address' => config('SETTINGS::MAIL:FROM_ADDRESS'), 'name' => config('SETTINGS::MAIL:FROM_NAME')]]);
|
||||||
|
|
||||||
|
Artisan::call('queue:restart');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set Recaptcha API Config
|
||||||
|
//only update config if recaptcha settings have changed in DB
|
||||||
|
if (
|
||||||
|
config('recaptcha.api_site_key') != config('SETTINGS::RECAPTCHA:SITE_KEY') ||
|
||||||
|
config('recaptcha.api_secret_key') != config('SETTINGS::RECAPTCHA:SECRET_KEY')
|
||||||
|
) {
|
||||||
|
config(['recaptcha.api_site_key' => config('SETTINGS::RECAPTCHA:SITE_KEY')]);
|
||||||
|
config(['recaptcha.api_secret_key' => config('SETTINGS::RECAPTCHA:SECRET_KEY')]);
|
||||||
|
|
||||||
|
Artisan::call('config:clear');
|
||||||
|
Artisan::call('cache:clear');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set Discord-API Config
|
||||||
|
config(['services.discord.client_id' => config('SETTINGS::DISCORD:CLIENT_ID')]);
|
||||||
|
config(['services.discord.client_secret' => config('SETTINGS::DISCORD:CLIENT_SECRET')]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,13 +14,13 @@ class DotEnv
|
||||||
|
|
||||||
public function __construct(string $path)
|
public function __construct(string $path)
|
||||||
{
|
{
|
||||||
if(!file_exists($path)) {
|
if (!file_exists($path)) {
|
||||||
throw new \InvalidArgumentException(sprintf('%s does not exist', $path));
|
throw new \InvalidArgumentException(sprintf('%s does not exist', $path));
|
||||||
}
|
}
|
||||||
$this->path = $path;
|
$this->path = $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load() :void
|
public function load(): void
|
||||||
{
|
{
|
||||||
if (!is_readable($this->path)) {
|
if (!is_readable($this->path)) {
|
||||||
throw new \RuntimeException(sprintf('%s file is not readable', $this->path));
|
throw new \RuntimeException(sprintf('%s file is not readable', $this->path));
|
||||||
|
|
|
@ -35,14 +35,12 @@ if (isset($_POST['checkDB'])) {
|
||||||
|
|
||||||
foreach ($values as $key => $value) {
|
foreach ($values as $key => $value) {
|
||||||
$param = $_POST[$value];
|
$param = $_POST[$value];
|
||||||
if ($key=="DB_PASSWORD"){
|
# if ($key == "DB_PASSWORD") {
|
||||||
$param ='"' . $_POST[$value] . '"';
|
# $param = '"' . $_POST[$value] . '"';
|
||||||
}
|
# }
|
||||||
setEnvironmentValue($key, $param);
|
setEnvironmentValue($key, $param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
header("LOCATION: index.php?step=2.5");
|
header("LOCATION: index.php?step=2.5");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -68,8 +66,11 @@ if (isset($_POST['checkGeneral'])) {
|
||||||
|
|
||||||
if (isset($_POST['installComposer'])) {
|
if (isset($_POST['installComposer'])) {
|
||||||
$logs = "";
|
$logs = "";
|
||||||
$logs .= run_console(putenv('COMPOSER_HOME=' . dirname(__FILE__, 3) . '/vendor/bin/composer'));
|
|
||||||
$logs .= run_console('composer install --no-dev --optimize-autoloader');
|
#$logs .= run_console(putenv('COMPOSER_HOME=' . dirname(__FILE__, 3) . '/vendor/bin/composer'));
|
||||||
|
#$logs .= run_console('composer install --no-dev --optimize-autoloader');
|
||||||
|
$logs .= run_console('php artisan migrate --seed --force');
|
||||||
|
$logs .= run_console('php artisan db:seed --class=ExampleItemsSeeder --force');
|
||||||
$logs .= run_console('php artisan key:generate --force');
|
$logs .= run_console('php artisan key:generate --force');
|
||||||
$logs .= run_console('php artisan storage:link');
|
$logs .= run_console('php artisan storage:link');
|
||||||
|
|
||||||
|
@ -77,15 +78,17 @@ if (isset($_POST['installComposer'])) {
|
||||||
fwrite($logsfile, $logs);
|
fwrite($logsfile, $logs);
|
||||||
fclose($logsfile);
|
fclose($logsfile);
|
||||||
|
|
||||||
if(str_contains(getEnvironmentValue("APP_KEY"), "base64")){
|
if (str_contains(getEnvironmentValue("APP_KEY"), "base64")) {
|
||||||
header("LOCATION: index.php?step=3");
|
header("LOCATION: index.php?step=3");
|
||||||
}else{
|
} else {
|
||||||
header("LOCATION: index.php?step=2.5&message=There was an error. Please check install/logs.txt !");
|
header("LOCATION: index.php?step=2.5&message=There was an error. Please check install/logs.txt !");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['checkSMTP'])) {
|
if (isset($_POST['checkSMTP'])) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$mail = new PHPMailer(true);
|
$mail = new PHPMailer(true);
|
||||||
|
|
||||||
|
@ -114,21 +117,26 @@ if (isset($_POST['checkSMTP'])) {
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db = new mysqli(getEnvironmentValue("DB_HOST"), getEnvironmentValue("DB_USERNAME"), getEnvironmentValue("DB_PASSWORD"), getEnvironmentValue("DB_DATABASE"), getEnvironmentValue("DB_PORT"));
|
||||||
|
if ($db->connect_error) {
|
||||||
|
header("LOCATION: index.php?step=4&message=Could not connect to the Database");
|
||||||
|
die();
|
||||||
|
}
|
||||||
$values = [
|
$values = [
|
||||||
//SETTINGS::VALUE => REQUEST-VALUE (coming from the html-form)
|
"SETTINGS::MAIL:MAILER" => $_POST["method"],
|
||||||
"MAIL_MAILER" => "method",
|
"SETTINGS::MAIL:HOST" => $_POST["host"],
|
||||||
"MAIL_HOST" => "host",
|
"SETTINGS::MAIL:PORT" => $_POST["port"],
|
||||||
"MAIL_PORT" => "port",
|
"SETTINGS::MAIL:USERNAME" => $_POST["user"],
|
||||||
"MAIL_USERNAME" => "user",
|
"SETTINGS::MAIL:PASSWORD" => $_POST["pass"],
|
||||||
"MAIL_PASSWORD" => "pass",
|
"SETTINGS::MAIL:ENCRYPTION" => $_POST["encryption"],
|
||||||
"MAIL_ENCRYPTION" => "encryption",
|
"SETTINGS::MAIL:FROM_ADDRESS" => $_POST["user"]
|
||||||
"MAIL_FROM_ADDRESS" => "user"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($values as $key => $value) {
|
foreach ($values as $key => $value) {
|
||||||
$param = $_POST[$value];
|
$query = "UPDATE `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` SET `value` = '$value' WHERE (`key` = '$key')";
|
||||||
setEnvironmentValue($key, $param);
|
$db->query($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
header("LOCATION: index.php?step=5");
|
header("LOCATION: index.php?step=5");
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,8 +170,10 @@ if (isset($_POST['checkPtero'])) {
|
||||||
header("LOCATION: index.php?step=5&message=Couldnt connect to Pterodactyl. Make sure your API key has all read and write permissions!");
|
header("LOCATION: index.php?step=5&message=Couldnt connect to Pterodactyl. Make sure your API key has all read and write permissions!");
|
||||||
die();
|
die();
|
||||||
} else {
|
} else {
|
||||||
$query1 = "UPDATE `dashboard`.`settings` SET `value` = '$url' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL')";
|
|
||||||
$query2 = "UPDATE `dashboard`.`settings` SET `value` = '$key' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN')";
|
$query1 = "UPDATE `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` SET `value` = '$url' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL')";
|
||||||
|
$query2 = "UPDATE `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` SET `value` = '$key' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN')";
|
||||||
|
|
||||||
|
|
||||||
$db = new mysqli(getEnvironmentValue("DB_HOST"), getEnvironmentValue("DB_USERNAME"), getEnvironmentValue("DB_PASSWORD"), getEnvironmentValue("DB_DATABASE"), getEnvironmentValue("DB_PORT"));
|
$db = new mysqli(getEnvironmentValue("DB_HOST"), getEnvironmentValue("DB_USERNAME"), getEnvironmentValue("DB_PASSWORD"), getEnvironmentValue("DB_DATABASE"), getEnvironmentValue("DB_PORT"));
|
||||||
if ($db->connect_error) {
|
if ($db->connect_error) {
|
||||||
|
@ -194,8 +204,10 @@ if (isset($_POST['createUser'])) {
|
||||||
$pteroID = $_POST['pteroID'];
|
$pteroID = $_POST['pteroID'];
|
||||||
$pass = $_POST['pass'];
|
$pass = $_POST['pass'];
|
||||||
$repass = $_POST['repass'];
|
$repass = $_POST['repass'];
|
||||||
$key = $db->query("SELECT `value` FROM dashboard.settings WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN'")->fetch_assoc();
|
|
||||||
$pterobaseurl = $db->query("SELECT `value` FROM dashboard.settings WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL'")->fetch_assoc();
|
$key = $db->query("SELECT `value` FROM `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN'")->fetch_assoc();
|
||||||
|
$pterobaseurl = $db->query("SELECT `value` FROM `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL'")->fetch_assoc();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$pteroURL = $pterobaseurl["value"] . "/api/application/users/" . $pteroID;
|
$pteroURL = $pterobaseurl["value"] . "/api/application/users/" . $pteroID;
|
||||||
|
@ -250,14 +262,16 @@ if (isset($_POST['createUser'])) {
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$query1 = "INSERT INTO `" . getEnvironmentValue("DB_DATABASE") . "`.`users` (`name`, `role`, `credits`, `server_limit`, `pterodactyl_id`, `email`, `password`, `created_at`) VALUES ('$name', 'admin', '250', '1', '$pteroID', '$mail', '$pass', CURRENT_TIMESTAMP)";
|
||||||
|
|
||||||
$query1 = "INSERT INTO `dashboard`.`users` (`name`, `role`, `credits`, `server_limit`, `pterodactyl_id`, `email`, `password`) VALUES ('$name', 'admin', '250', '1', '$pteroID', '$mail', '$pass')";
|
|
||||||
|
|
||||||
|
|
||||||
if ($db->query($query1)) {
|
if ($db->query($query1)) {
|
||||||
header("LOCATION: index.php?step=7");
|
header("LOCATION: index.php?step=7");
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
header("LOCATION: index.php?step=6&message=Something went wrong when communicating with the Database!");
|
header("LOCATION: index.php?step=6&message=Something went wrong when communicating with the Database!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ function checkExtensions()
|
||||||
$extentions = get_loaded_extensions();
|
$extentions = get_loaded_extensions();
|
||||||
|
|
||||||
foreach ($required_extentions as $ext) {
|
foreach ($required_extentions as $ext) {
|
||||||
if(!preg_grep("/^(?=.*".$ext.").*$/", $extentions))
|
if (!preg_grep("/^(?=.*" . $ext . ").*$/", $extentions))
|
||||||
array_push($not_ok, $ext);
|
array_push($not_ok, $ext);
|
||||||
}
|
}
|
||||||
return $not_ok;
|
return $not_ok;
|
||||||
|
@ -95,7 +95,8 @@ function setEnvironmentValue($envKey, $envValue)
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEnvironmentValue($envKey){
|
function getEnvironmentValue($envKey)
|
||||||
|
{
|
||||||
$envFile = dirname(__FILE__, 3) . "/.env";
|
$envFile = dirname(__FILE__, 3) . "/.env";
|
||||||
$str = file_get_contents($envFile);
|
$str = file_get_contents($envFile);
|
||||||
|
|
||||||
|
@ -106,14 +107,17 @@ function getEnvironmentValue($envKey){
|
||||||
$value = substr($oldLine, strpos($oldLine, "=") + 1);
|
$value = substr($oldLine, strpos($oldLine, "=") + 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_console($command){
|
|
||||||
|
function run_console($command)
|
||||||
|
{
|
||||||
$path = dirname(__FILE__, 3);
|
$path = dirname(__FILE__, 3);
|
||||||
$cmd = "cd '$path' && bash -c 'exec -a ServerCPP $command' 2>&1";
|
$cmd = "cd '$path' && bash -c 'exec -a ServerCPP $command' 2>&1";
|
||||||
return shell_exec($cmd);
|
return shell_exec($cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -54,8 +54,10 @@ $cardheader = '
|
||||||
|
|
||||||
if (!isset($_GET['step'])) {
|
if (!isset($_GET['step'])) {
|
||||||
|
|
||||||
if(!file_exists("../../.env")){
|
|
||||||
|
if (!file_exists("../../.env")) {
|
||||||
echo run_console('cp .env.example .env');
|
echo run_console('cp .env.example .env');
|
||||||
|
|
||||||
}
|
}
|
||||||
echo $cardheader;
|
echo $cardheader;
|
||||||
?>
|
?>
|
||||||
|
@ -72,7 +74,9 @@ if (!isset($_GET['step'])) {
|
||||||
foreach (checkExtensions() as $ext) {
|
foreach (checkExtensions() as $ext) {
|
||||||
echo $ext . ", ";
|
echo $ext . ", ";
|
||||||
}
|
}
|
||||||
print(sizeof(checkExtensions()) == 0 ? "" : "(Proceed anyway)");?></p>
|
|
||||||
|
print(sizeof(checkExtensions()) == 0 ? "" : "(Proceed anyway)"); ?></p>
|
||||||
|
|
||||||
|
|
||||||
<!-- <p class="<?php print(getZipVersion() === "OK" ? "ok" : "notok"); ?>"> Zip
|
<!-- <p class="<?php print(getZipVersion() === "OK" ? "ok" : "notok"); ?>"> Zip
|
||||||
version: <?php echo getZipVersion(); ?> </p> -->
|
version: <?php echo getZipVersion(); ?> </p> -->
|
||||||
|
@ -169,7 +173,7 @@ echo $cardheader;
|
||||||
if (isset($_GET['step']) && $_GET['step'] == 2.5) {
|
if (isset($_GET['step']) && $_GET['step'] == 2.5) {
|
||||||
echo $cardheader;
|
echo $cardheader;
|
||||||
?>
|
?>
|
||||||
<p class="login-box-msg">Lets install Composer!</p>
|
<p class="login-box-msg">Lets install Composer and generate some security keys!</p>
|
||||||
<p> This process might take a while. Please do not refresh or close this page!</p>
|
<p> This process might take a while. Please do not refresh or close this page!</p>
|
||||||
<?php if (isset($_GET['message'])) {
|
<?php if (isset($_GET['message'])) {
|
||||||
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
||||||
|
@ -191,10 +195,12 @@ echo $cardheader;
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isset($_GET['step']) && $_GET['step'] == 3) {
|
if (isset($_GET['step']) && $_GET['step'] == 3) {
|
||||||
echo $cardheader;
|
echo $cardheader;
|
||||||
?>
|
?>
|
||||||
<p class="login-box-msg">Tell us something about your Host</p>
|
<p class="login-box-msg">Tell us something about your Host</p>
|
||||||
|
|
||||||
<?php if (isset($_GET['message'])) {
|
<?php if (isset($_GET['message'])) {
|
||||||
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
||||||
}
|
}
|
||||||
|
@ -203,6 +209,7 @@ echo $cardheader;
|
||||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||||
action="/install/forms.php" name="checkGeneral">
|
action="/install/forms.php" name="checkGeneral">
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -222,7 +229,6 @@ echo $cardheader;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-primary" name="checkGeneral">Submit</button>
|
<button class="btn btn-primary" name="checkGeneral">Submit</button>
|
||||||
|
@ -239,14 +245,17 @@ echo $cardheader;
|
||||||
?>
|
?>
|
||||||
<p class="login-box-msg">Lets get your E-Mails going! </p>
|
<p class="login-box-msg">Lets get your E-Mails going! </p>
|
||||||
<p class="login-box-msg">This might take a few seconds when submitted! </p>
|
<p class="login-box-msg">This might take a few seconds when submitted! </p>
|
||||||
|
|
||||||
<?php if (isset($_GET['message'])) {
|
<?php if (isset($_GET['message'])) {
|
||||||
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||||
|
|
||||||
action="/install/forms.php" name="checkSMTP">
|
action="/install/forms.php" name="checkSMTP">
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -255,6 +264,7 @@ echo $cardheader;
|
||||||
<input id="method" name="method"
|
<input id="method" name="method"
|
||||||
type="text" required
|
type="text" required
|
||||||
value="smtp" class="form-control">
|
value="smtp" class="form-control">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -306,6 +316,8 @@ echo $cardheader;
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-primary" name="checkSMTP">Submit</button>
|
<button class="btn btn-primary" name="checkSMTP">Submit</button>
|
||||||
|
<a href="?step=5"><button class="btn btn-warning">Skip this step</button></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -314,40 +326,14 @@ echo $cardheader;
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['step']) && $_GET['step'] == 5) {
|
if (isset($_GET['step']) && $_GET['step'] == 5) {
|
||||||
if (isset($_GET['exec'])) {
|
|
||||||
$resp = "";
|
|
||||||
$resp = run_console('php artisan migrate --seed --force');
|
|
||||||
$resp .= run_console('php artisan db:seed --class=ExampleItemsSeeder --force');
|
|
||||||
$logsfile = fopen("logs.txt", "w") or die("Unable to open file!");
|
|
||||||
fwrite($logsfile, $resp);
|
|
||||||
fclose($logsfile);
|
|
||||||
}
|
|
||||||
echo $cardheader;
|
echo $cardheader;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p class="login-box-msg">Almost done! </p>
|
<p class="login-box-msg">Almost done! </p>
|
||||||
<p class="login-box-msg">Lets get some info about your Pterodactyl Installation!</p>
|
<p class="login-box-msg">Lets get some info about your Pterodactyl Installation!</p>
|
||||||
<p class="alert alert-warning" role="alert">Before filling these information, make sure to click the button below</p>
|
|
||||||
<?php
|
|
||||||
if (!isset($resp)) { ?>
|
|
||||||
|
|
||||||
<a href="?step=5&exec">
|
|
||||||
<button class="btn btn-success">Run DB-Seeding!</button>
|
|
||||||
|
|
||||||
</a>
|
|
||||||
<?php } else {
|
|
||||||
echo
|
|
||||||
"<div class='alert alert-info'>";
|
|
||||||
if(str_contains($resp,"Database seeding completed successfully.")){
|
|
||||||
echo "All done!";
|
|
||||||
}else{
|
|
||||||
|
|
||||||
"There was an error. Check /install/logs.txt";
|
|
||||||
}
|
|
||||||
echo "</div>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
<?php if (isset($_GET['message'])) {
|
<?php if (isset($_GET['message'])) {
|
||||||
|
@ -356,12 +342,15 @@ echo $cardheader;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||||
|
|
||||||
action="/install/forms.php" name="checkPtero">
|
action="/install/forms.php" name="checkPtero">
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-control mb-3">
|
<div class="custom-control mb-3">
|
||||||
|
|
||||||
<label for="url">Pterodactyl URL</label>
|
<label for="url">Pterodactyl URL</label>
|
||||||
<input id="url" name="url"
|
<input id="url" name="url"
|
||||||
type="text" required
|
type="text" required
|
||||||
|
@ -381,7 +370,10 @@ echo $cardheader;
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button <?php if(!isset($_GET['exec'])){echo "disabled";} ?> class="btn btn-primary" name="checkPtero">Submit</button>
|
<button <?php if (!isset($_GET['exec'])) {
|
||||||
|
echo "disabled";
|
||||||
|
} ?> class="btn btn-primary" name="checkPtero">Submit
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
0
public/install/install.lock
Normal file
0
public/install/install.lock
Normal file
16
public/install/logs.txt
Normal file
16
public/install/logs.txt
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Nothing to migrate.
|
||||||
|
Seeding: Database\Seeders\Seeds\SettingsSeeder
|
||||||
|
Seeded: Database\Seeders\Seeds\SettingsSeeder (38.00ms)
|
||||||
|
Database seeding completed successfully.
|
||||||
|
Seeding: Database\Seeders\Seeds\ProductSeeder
|
||||||
|
Seeded: Database\Seeders\Seeds\ProductSeeder (100.42ms)
|
||||||
|
Seeding: Database\Seeders\Seeds\CreditProductSeeder
|
||||||
|
Seeded: Database\Seeders\Seeds\CreditProductSeeder (18.76ms)
|
||||||
|
Seeding: Database\Seeders\Seeds\ApplicationApiSeeder
|
||||||
|
Seeded: Database\Seeders\Seeds\ApplicationApiSeeder (3.40ms)
|
||||||
|
Seeding: Database\Seeders\Seeds\UsefulLinksSeeder
|
||||||
|
Seeded: Database\Seeders\Seeds\UsefulLinksSeeder (7.57ms)
|
||||||
|
Database seeding completed successfully.
|
||||||
|
Application key set successfully.
|
||||||
|
The [/windir/c/Users/leipe/Desktop/dashboard/public/storage] link already exists.
|
||||||
|
The links have been created.
|
|
@ -23,7 +23,6 @@
|
||||||
<!-- MAIN CONTENT -->
|
<!-- MAIN CONTENT -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
|
Loading…
Reference in a new issue