mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
add clamav as option
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
31f86c1570
commit
38726f039a
13 changed files with 155 additions and 7 deletions
|
|
@ -35,6 +35,17 @@ class ConfigurationController
|
|||
$this->configurationManager->SetBorgBackupHostLocation($request->getParsedBody()['borg_backup_host_location']);
|
||||
}
|
||||
|
||||
if (isset($request->getParsedBody()['clamav'])) {
|
||||
$value = $request->getParsedBody()['clamav'];
|
||||
if ($value === 'on') {
|
||||
$this->configurationManager->SetClamavEnabledState(1);
|
||||
} elseif ($value === 'off') {
|
||||
$this->configurationManager->SetClamavEnabledState(0);
|
||||
} else {
|
||||
error_log('It seems like clamav was changed but not to on or off.');
|
||||
}
|
||||
}
|
||||
|
||||
return $response->withStatus(201)->withHeader('Location', '/');
|
||||
} catch (InvalidSettingConfigurationException $ex) {
|
||||
$response->getBody()->write($ex->getMessage());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue