Updates, fixes, etc
This commit is contained in:
parent
fafe3f61c0
commit
2274013221
8 changed files with 319 additions and 239 deletions
|
@ -51,5 +51,60 @@ class AppServiceProvider extends ServiceProvider
|
|||
|
||||
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)
|
||||
{
|
||||
if(!file_exists($path)) {
|
||||
if (!file_exists($path)) {
|
||||
throw new \InvalidArgumentException(sprintf('%s does not exist', $path));
|
||||
}
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
public function load() :void
|
||||
public function load(): void
|
||||
{
|
||||
if (!is_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) {
|
||||
$param = $_POST[$value];
|
||||
if ($key=="DB_PASSWORD"){
|
||||
$param ='"' . $_POST[$value] . '"';
|
||||
}
|
||||
# if ($key == "DB_PASSWORD") {
|
||||
# $param = '"' . $_POST[$value] . '"';
|
||||
# }
|
||||
setEnvironmentValue($key, $param);
|
||||
}
|
||||
|
||||
|
||||
|
||||
header("LOCATION: index.php?step=2.5");
|
||||
|
||||
}
|
||||
|
@ -68,24 +66,29 @@ if (isset($_POST['checkGeneral'])) {
|
|||
|
||||
if (isset($_POST['installComposer'])) {
|
||||
$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('php artisan key:generate --force');
|
||||
$logs .= run_console('php artisan storage:link');
|
||||
|
||||
$logsfile = fopen("logs.txt", "w") or die("Unable to open file!");
|
||||
fwrite($logsfile, $logs);
|
||||
fclose($logsfile);
|
||||
#$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 storage:link');
|
||||
|
||||
$logsfile = fopen("logs.txt", "w") or die("Unable to open file!");
|
||||
fwrite($logsfile, $logs);
|
||||
fclose($logsfile);
|
||||
|
||||
if (str_contains(getEnvironmentValue("APP_KEY"), "base64")) {
|
||||
header("LOCATION: index.php?step=3");
|
||||
} else {
|
||||
header("LOCATION: index.php?step=2.5&message=There was an error. Please check install/logs.txt !");
|
||||
}
|
||||
|
||||
if(str_contains(getEnvironmentValue("APP_KEY"), "base64")){
|
||||
header("LOCATION: index.php?step=3");
|
||||
}else{
|
||||
header("LOCATION: index.php?step=2.5&message=There was an error. Please check install/logs.txt !");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (isset($_POST['checkSMTP'])) {
|
||||
|
||||
try {
|
||||
$mail = new PHPMailer(true);
|
||||
|
||||
|
@ -114,21 +117,26 @@ if (isset($_POST['checkSMTP'])) {
|
|||
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 = [
|
||||
//SETTINGS::VALUE => REQUEST-VALUE (coming from the html-form)
|
||||
"MAIL_MAILER" => "method",
|
||||
"MAIL_HOST" => "host",
|
||||
"MAIL_PORT" => "port",
|
||||
"MAIL_USERNAME" => "user",
|
||||
"MAIL_PASSWORD" => "pass",
|
||||
"MAIL_ENCRYPTION" => "encryption",
|
||||
"MAIL_FROM_ADDRESS" => "user"
|
||||
"SETTINGS::MAIL:MAILER" => $_POST["method"],
|
||||
"SETTINGS::MAIL:HOST" => $_POST["host"],
|
||||
"SETTINGS::MAIL:PORT" => $_POST["port"],
|
||||
"SETTINGS::MAIL:USERNAME" => $_POST["user"],
|
||||
"SETTINGS::MAIL:PASSWORD" => $_POST["pass"],
|
||||
"SETTINGS::MAIL:ENCRYPTION" => $_POST["encryption"],
|
||||
"SETTINGS::MAIL:FROM_ADDRESS" => $_POST["user"]
|
||||
];
|
||||
|
||||
foreach ($values as $key => $value) {
|
||||
$param = $_POST[$value];
|
||||
setEnvironmentValue($key, $param);
|
||||
$query = "UPDATE `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` SET `value` = '$value' WHERE (`key` = '$key')";
|
||||
$db->query($query);
|
||||
}
|
||||
|
||||
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!");
|
||||
die();
|
||||
} 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"));
|
||||
if ($db->connect_error) {
|
||||
|
@ -194,8 +204,10 @@ if (isset($_POST['createUser'])) {
|
|||
$pteroID = $_POST['pteroID'];
|
||||
$pass = $_POST['pass'];
|
||||
$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;
|
||||
|
@ -250,14 +262,16 @@ if (isset($_POST['createUser'])) {
|
|||
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)) {
|
||||
header("LOCATION: index.php?step=7");
|
||||
} else {
|
||||
|
||||
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();
|
||||
|
||||
foreach ($required_extentions as $ext) {
|
||||
if(!preg_grep("/^(?=.*".$ext.").*$/", $extentions))
|
||||
if (!preg_grep("/^(?=.*" . $ext . ").*$/", $extentions))
|
||||
array_push($not_ok, $ext);
|
||||
}
|
||||
return $not_ok;
|
||||
|
@ -95,7 +95,8 @@ function setEnvironmentValue($envKey, $envValue)
|
|||
fclose($fp);
|
||||
}
|
||||
|
||||
function getEnvironmentValue($envKey){
|
||||
function getEnvironmentValue($envKey)
|
||||
{
|
||||
$envFile = dirname(__FILE__, 3) . "/.env";
|
||||
$str = file_get_contents($envFile);
|
||||
|
||||
|
@ -103,17 +104,20 @@ function getEnvironmentValue($envKey){
|
|||
$keyPosition = strpos($str, "{$envKey}=");
|
||||
$endOfLinePosition = strpos($str, PHP_EOL, $keyPosition);
|
||||
$oldLine = substr($str, $keyPosition, $endOfLinePosition - $keyPosition);
|
||||
$value = substr($oldLine, strpos($oldLine, "=") + 1);
|
||||
$value = substr($oldLine, strpos($oldLine, "=") + 1);
|
||||
|
||||
|
||||
|
||||
return $value;
|
||||
|
||||
}
|
||||
|
||||
function run_console($command){
|
||||
$path = dirname(__FILE__, 3);
|
||||
$cmd = "cd '$path' && bash -c 'exec -a ServerCPP $command' 2>&1";
|
||||
return shell_exec($cmd);
|
||||
}
|
||||
|
||||
function run_console($command)
|
||||
{
|
||||
$path = dirname(__FILE__, 3);
|
||||
$cmd = "cd '$path' && bash -c 'exec -a ServerCPP $command' 2>&1";
|
||||
return shell_exec($cmd);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -53,9 +53,11 @@ $cardheader = '
|
|||
|
||||
|
||||
if (!isset($_GET['step'])) {
|
||||
|
||||
if(!file_exists("../../.env")){
|
||||
echo run_console('cp .env.example .env');
|
||||
|
||||
|
||||
if (!file_exists("../../.env")) {
|
||||
echo run_console('cp .env.example .env');
|
||||
|
||||
}
|
||||
echo $cardheader;
|
||||
?>
|
||||
|
@ -72,7 +74,9 @@ if (!isset($_GET['step'])) {
|
|||
foreach (checkExtensions() as $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
|
||||
version: <?php echo getZipVersion(); ?> </p> -->
|
||||
|
@ -169,7 +173,7 @@ echo $cardheader;
|
|||
if (isset($_GET['step']) && $_GET['step'] == 2.5) {
|
||||
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>
|
||||
<?php if (isset($_GET['message'])) {
|
||||
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
||||
|
@ -181,7 +185,7 @@ echo $cardheader;
|
|||
action="/install/forms.php" name="installComposer">
|
||||
|
||||
|
||||
<button class="btn btn-primary" name="installComposer">Submit</button>
|
||||
<button class="btn btn-primary" name="installComposer">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -191,121 +195,43 @@ echo $cardheader;
|
|||
<?php
|
||||
}
|
||||
|
||||
if (isset($_GET['step']) && $_GET['step'] == 3) {
|
||||
echo $cardheader;
|
||||
?>
|
||||
<p class="login-box-msg">Tell us something about your Host</p>
|
||||
<?php if (isset($_GET['message'])) {
|
||||
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||
action="/install/forms.php" name="checkGeneral">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="database">Your Dashboard URL</label>
|
||||
<input id="url" name="url"
|
||||
type="text" required
|
||||
value="https://dash.example.com" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="name">Your Host-Name</label>
|
||||
<input id="name" name="name" type="text"
|
||||
required
|
||||
value="Controlpanel.gg" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" name="checkGeneral">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
if (isset($_GET['step']) && $_GET['step'] == 4) {
|
||||
if (isset($_GET['step']) && $_GET['step'] == 3) {
|
||||
echo $cardheader;
|
||||
?>
|
||||
<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">Tell us something about your Host</p>
|
||||
|
||||
<?php if (isset($_GET['message'])) {
|
||||
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||
action="/install/forms.php" name="checkSMTP">
|
||||
action="/install/forms.php" name="checkGeneral">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="method">Your E-Mail method</label>
|
||||
<input id="method" name="method"
|
||||
<label for="database">Your Dashboard URL</label>
|
||||
<input id="url" name="url"
|
||||
type="text" required
|
||||
value="smtp" class="form-control">
|
||||
value="https://dash.example.com" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="host">Your Mailer-Host</label>
|
||||
<input id="host" name="host" type="text"
|
||||
<label for="name">Your Host-Name</label>
|
||||
<input id="name" name="name" type="text"
|
||||
required
|
||||
value="smtp.google.com" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="port">Your Mail Port</label>
|
||||
<input id="port" name="port" type="port"
|
||||
required
|
||||
value="567" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="user">Your Mail User</label>
|
||||
<input id="user" name="user" type="text"
|
||||
required
|
||||
value="info@mydomain.com" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="pass">Your Mail-User Password</label>
|
||||
<input id="pass" name="pass" type="password"
|
||||
required
|
||||
value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="encryption">Your Mail encryption method</label>
|
||||
<input id="encryption" name="encryption" type="text"
|
||||
required
|
||||
value="tls" class="form-control">
|
||||
value="Controlpanel.gg" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" name="checkSMTP">Submit</button>
|
||||
<button class="btn btn-primary" name="checkGeneral">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -314,41 +240,11 @@ echo $cardheader;
|
|||
|
||||
<?php
|
||||
}
|
||||
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);
|
||||
}
|
||||
if (isset($_GET['step']) && $_GET['step'] == 4) {
|
||||
echo $cardheader;
|
||||
?>
|
||||
|
||||
<p class="login-box-msg">Almost done! </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>";
|
||||
}
|
||||
?>
|
||||
|
||||
<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>
|
||||
|
||||
<?php if (isset($_GET['message'])) {
|
||||
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
||||
|
@ -356,32 +252,72 @@ echo $cardheader;
|
|||
?>
|
||||
|
||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||
action="/install/forms.php" name="checkPtero">
|
||||
|
||||
action="/install/forms.php" name="checkSMTP">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="url">Pterodactyl URL</label>
|
||||
<input id="url" name="url"
|
||||
<label for="method">Your E-Mail method</label>
|
||||
<input id="method" name="method"
|
||||
type="text" required
|
||||
value="https://ptero.example.com" class="form-control">
|
||||
value="smtp" class="form-control">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="key">Pterodactyl API-Key</label>
|
||||
<input id="key" name="key" type="text"
|
||||
<label for="host">Your Mailer-Host</label>
|
||||
<input id="host" name="host" type="text"
|
||||
required
|
||||
value="" class="form-control"
|
||||
placeholder="The Key needs ALL read&write Permissions!">
|
||||
value="smtp.google.com" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="port">Your Mail Port</label>
|
||||
<input id="port" name="port" type="port"
|
||||
required
|
||||
value="567" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="user">Your Mail User</label>
|
||||
<input id="user" name="user" type="text"
|
||||
required
|
||||
value="info@mydomain.com" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="pass">Your Mail-User Password</label>
|
||||
<input id="pass" name="pass" type="password"
|
||||
required
|
||||
value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="encryption">Your Mail encryption method</label>
|
||||
<input id="encryption" name="encryption" type="text"
|
||||
required
|
||||
value="tls" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button <?php if(!isset($_GET['exec'])){echo "disabled";} ?> class="btn btn-primary" name="checkPtero">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>
|
||||
|
||||
|
@ -391,68 +327,53 @@ echo $cardheader;
|
|||
<?php
|
||||
}
|
||||
|
||||
if (isset($_GET['step']) && $_GET['step'] == 6) {
|
||||
if (isset($_GET['step']) && $_GET['step'] == 5) {
|
||||
|
||||
echo $cardheader;
|
||||
?>
|
||||
<p class="login-box-msg">Lets create yourself!</p>
|
||||
<p class="login-box-msg">We're making the first Admin user</p>
|
||||
|
||||
<p class="login-box-msg">Almost done! </p>
|
||||
<p class="login-box-msg">Lets get some info about your Pterodactyl Installation!</p>
|
||||
|
||||
|
||||
<?php if (isset($_GET['message'])) {
|
||||
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||
action="/install/forms.php" name="createUser">
|
||||
|
||||
action="/install/forms.php" name="checkPtero">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="user">Your Username</label>
|
||||
<input id="user" name="user"
|
||||
|
||||
<label for="url">Pterodactyl URL</label>
|
||||
<input id="url" name="url"
|
||||
type="text" required
|
||||
value="" class="form-control">
|
||||
value="https://ptero.example.com" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="email">Your Email Adress (used to Login)</label>
|
||||
<input id="email" name="email"
|
||||
type="text" required
|
||||
value="" class="form-control">
|
||||
<label for="key">Pterodactyl API-Key</label>
|
||||
<input id="key" name="key" type="text"
|
||||
required
|
||||
value="" class="form-control"
|
||||
placeholder="The Key needs ALL read&write Permissions!">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="pass">Password</label>
|
||||
<input id="pass" name="pass" type="password"
|
||||
required
|
||||
value="" minlength="8" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="repass">Retype Pass</label>
|
||||
<input id="repass" name="repass" type="password"
|
||||
required
|
||||
value="" minlength="8" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="pteroID">Your Pterodactyl User-ID</label>
|
||||
<input id="pteroID" name="pteroID" type="text"
|
||||
required
|
||||
value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" name="createUser">Submit</button>
|
||||
<button <?php if (!isset($_GET['exec'])) {
|
||||
echo "disabled";
|
||||
} ?> class="btn btn-primary" name="checkPtero">Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -461,30 +382,101 @@ echo $cardheader;
|
|||
|
||||
<?php
|
||||
}
|
||||
if (isset($_GET['step']) && $_GET['step'] == 7) {
|
||||
$lockfile = fopen("install.lock", "w") or die("Unable to open file!");
|
||||
fwrite($lockfile, "locked");
|
||||
fclose($lockfile);
|
||||
|
||||
echo $cardheader;
|
||||
|
||||
?>
|
||||
<p class="login-box-msg">All done!</p>
|
||||
<p class="login-box-msg">You may navigate to your Dashboard now and log in!</p>
|
||||
<a href="<?php echo "https://" . $_SERVER['SERVER_NAME']; ?>">
|
||||
<button class="btn btn-success">Lets go!</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if (isset($_GET['step']) && $_GET['step'] == 6) {
|
||||
echo $cardheader;
|
||||
?>
|
||||
<p class="login-box-msg">Lets create yourself!</p>
|
||||
<p class="login-box-msg">We're making the first Admin user</p>
|
||||
<?php if (isset($_GET['message'])) {
|
||||
echo "<p class='notok'>" . $_GET['message'] . "</p>";
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||
action="/install/forms.php" name="createUser">
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
|
||||
crossorigin="anonymous"></script>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="user">Your Username</label>
|
||||
<input id="user" name="user"
|
||||
type="text" required
|
||||
value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="email">Your Email Adress (used to Login)</label>
|
||||
<input id="email" name="email"
|
||||
type="text" required
|
||||
value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="pass">Password</label>
|
||||
<input id="pass" name="pass" type="password"
|
||||
required
|
||||
value="" minlength="8" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="repass">Retype Pass</label>
|
||||
<input id="repass" name="repass" type="password"
|
||||
required
|
||||
value="" minlength="8" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control mb-3">
|
||||
<label for="pteroID">Your Pterodactyl User-ID</label>
|
||||
<input id="pteroID" name="pteroID" type="text"
|
||||
required
|
||||
value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" name="createUser">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
if (isset($_GET['step']) && $_GET['step'] == 7) {
|
||||
$lockfile = fopen("install.lock", "w") or die("Unable to open file!");
|
||||
fwrite($lockfile, "locked");
|
||||
fclose($lockfile);
|
||||
|
||||
echo $cardheader;
|
||||
|
||||
?>
|
||||
<p class="login-box-msg">All done!</p>
|
||||
<p class="login-box-msg">You may navigate to your Dashboard now and log in!</p>
|
||||
<a href="<?php echo "https://" . $_SERVER['SERVER_NAME']; ?>">
|
||||
<button class="btn btn-success">Lets go!</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
|
||||
crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
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 -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header">
|
||||
|
|
Loading…
Reference in a new issue