mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Created installation script and installation command
This commit is contained in:
parent
cffa43a155
commit
56af58fcb8
@ -36,6 +36,8 @@ class InstallCommand extends Command
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$params['DB_NAME'] = $this->ask('Database name', 'shlink');
|
$params['DB_NAME'] = $this->ask('Database name', 'shlink');
|
||||||
|
$params['DB_USER'] = $this->ask('Database username');
|
||||||
|
$params['DB_PASSWORD'] = $this->ask('Database password');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,9 +53,14 @@ class InstallCommand extends Command
|
|||||||
if (isset($default)) {
|
if (isset($default)) {
|
||||||
$text .= ' (defaults to ' . $default . ')';
|
$text .= ' (defaults to ' . $default . ')';
|
||||||
}
|
}
|
||||||
return $questionHelper->ask($this->input, $this->output, new Question(
|
$value = '';
|
||||||
' <question>' . $text . ':</question> ',
|
while (empty($value) && empty($default)) {
|
||||||
$default
|
$value = $questionHelper->ask($this->input, $this->output, new Question(
|
||||||
));
|
' <question>' . $text . ':</question> ',
|
||||||
|
$default
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user