Slightly rework installer to ask most questions on initial install.

This commit is contained in:
Buster "Silver Eagle" Neece 2021-07-09 17:59:30 -05:00
parent 4781040e8d
commit 079c9eedd3
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
2 changed files with 12 additions and 10 deletions

View File

@ -18,5 +18,5 @@ $console->command(
new App\Installer\Command\InstallCommand($environment)
);
$console->setDefaultCommand('install');
$console->setDefaultCommand('install', true);
$console->run();

View File

@ -52,7 +52,7 @@ class InstallCommand
}
// Initialize locale for translated installer/updater.
if ($isNewInstall || empty($azuracastEnv[Environment::LANG])) {
if (!$defaults && ($isNewInstall || empty($azuracastEnv[Environment::LANG]))) {
$langOptions = [];
foreach (Locale::SUPPORTED_LOCALES as $langKey => $langName) {
$langOptions[Locale::stripLocaleEncoding($langKey)] = $langName;
@ -109,19 +109,21 @@ class InstallCommand
$io->block(
__('Welcome to AzuraCast! Complete the initial server setup by answering a few questions.')
);
$customize = !$defaults;
} else {
$io->title(
__('AzuraCast Updater')
);
}
if ($defaults) {
$customize = false;
} else {
$customize = $io->confirm(
__('Customize server settings (ports, databases, etc.)?'),
false
);
if ($defaults) {
$customize = false;
} else {
$customize = $io->confirm(
__('Change installation settings?'),
false
);
}
}
if ($customize) {