ids.cgi: Add some more sanity checks when adding a new provider.

* Check if the system is online.
* Check if enough free disk space is available.
* Abort whith an error message if the ruleset could not be
  downloaded.

In error case the provider now will be removed again from the file which
keeps the configured providers. Sadly it needs to be added first because
otherwise the downloader could not read the required values from it.....

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2021-04-14 20:32:14 +02:00
parent 214f34ec4e
commit 969983eba4
3 changed files with 44 additions and 18 deletions

View File

@@ -1377,6 +1377,7 @@
'ids apply ruleset changes' => 'Regeländerungen werden übernommen. Bitte warten Sie, bis dieser Vorgang erfolgreich beendet wurde...',
'ids autoupdates' => 'Automatische Updates',
'ids automatic rules update' => 'Automatische Regelaktualisierung',
'ids could not add provider' => 'Provider konnte nicht hinzugefügt werden',
'ids customize ruleset' => 'Regelset anpassen',
'ids download new ruleset' => 'Das neue Regelset wird heruntergeladen und entpackt. Bitte warten Sie, bis dieser Vorgang erfolgreich beendet wurde...',
'ids enable' => 'Einbruchsverhinderungssystem aktivieren',
@@ -1400,6 +1401,7 @@
'ids ruleset settings' => 'Regelsatzeinstellungen',
'ids show' => 'Anzeigen',
'ids the choosen provider is already in use' => 'Der gewhählte Provider wird bereits verwendet.',
'ids unable to download the ruleset' => 'Das Regelset konnte nicht heruntergeladen werden.',
'ids visit provider website' => 'Anbieter-Webseite besuchen',
'ids working' => 'Änderungen werden übernommen. Bitte warten Sie, bis dieser Vorgang erfolgreich beendet wurde.',
'iface' => 'Iface',