Slightly rework installer to ask most questions on initial install.
This commit is contained in:
parent
4781040e8d
commit
079c9eedd3
|
@ -18,5 +18,5 @@ $console->command(
|
||||||
new App\Installer\Command\InstallCommand($environment)
|
new App\Installer\Command\InstallCommand($environment)
|
||||||
);
|
);
|
||||||
|
|
||||||
$console->setDefaultCommand('install');
|
$console->setDefaultCommand('install', true);
|
||||||
$console->run();
|
$console->run();
|
||||||
|
|
|
@ -52,7 +52,7 @@ class InstallCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize locale for translated installer/updater.
|
// Initialize locale for translated installer/updater.
|
||||||
if ($isNewInstall || empty($azuracastEnv[Environment::LANG])) {
|
if (!$defaults && ($isNewInstall || empty($azuracastEnv[Environment::LANG]))) {
|
||||||
$langOptions = [];
|
$langOptions = [];
|
||||||
foreach (Locale::SUPPORTED_LOCALES as $langKey => $langName) {
|
foreach (Locale::SUPPORTED_LOCALES as $langKey => $langName) {
|
||||||
$langOptions[Locale::stripLocaleEncoding($langKey)] = $langName;
|
$langOptions[Locale::stripLocaleEncoding($langKey)] = $langName;
|
||||||
|
@ -109,19 +109,21 @@ class InstallCommand
|
||||||
$io->block(
|
$io->block(
|
||||||
__('Welcome to AzuraCast! Complete the initial server setup by answering a few questions.')
|
__('Welcome to AzuraCast! Complete the initial server setup by answering a few questions.')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$customize = !$defaults;
|
||||||
} else {
|
} else {
|
||||||
$io->title(
|
$io->title(
|
||||||
__('AzuraCast Updater')
|
__('AzuraCast Updater')
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
if ($defaults) {
|
if ($defaults) {
|
||||||
$customize = false;
|
$customize = false;
|
||||||
} else {
|
} else {
|
||||||
$customize = $io->confirm(
|
$customize = $io->confirm(
|
||||||
__('Customize server settings (ports, databases, etc.)?'),
|
__('Change installation settings?'),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($customize) {
|
if ($customize) {
|
||||||
|
|
Loading…
Reference in New Issue