add new setting to preselect system distribution to ease configuration
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -43,6 +43,11 @@ if ($userinfo['change_serversettings'] == '1') {
|
||||
// get distro from URL param
|
||||
$distribution = Request::get('distribution');
|
||||
|
||||
// check for possible setting
|
||||
if (empty($distribution)) {
|
||||
$distribution = Settings::Get('system.distribution') ?? "";
|
||||
}
|
||||
|
||||
$distributions_select = [];
|
||||
|
||||
$services = [];
|
||||
@@ -53,6 +58,11 @@ if ($userinfo['change_serversettings'] == '1') {
|
||||
Response::dynamicError("Unknown distribution");
|
||||
}
|
||||
|
||||
// update setting if different
|
||||
if ($distribution != Settings::Get('system.distribution')) {
|
||||
Settings::Set('system.distribution', $distribution);
|
||||
}
|
||||
|
||||
// create configparser object
|
||||
$configfiles = new ConfigParser($config_dir . '/' . $distribution . ".xml");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user