]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
backup.pl: Run snort to suricata converter when a backup gets restored.
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 29 Jan 2019 07:40:34 +0000 (08:40 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 29 Jan 2019 07:40:34 +0000 (08:40 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/backup/backup.pl

index 3accbcfff852fd5a422f3f9c4c1a14a4c9cc57f8..5737740e5684bd49f34500cec52596fd458b24bb 100644 (file)
@@ -129,6 +129,15 @@ restore_backup() {
        # Convert old OpenVPN CCD files (CN change, Core Update 75)
        convert-ovpn
 
+       # Snort to suricata converter.
+       if [ -d "/var/ipfire/snort" ]; then
+               # Run converter
+               convert-snort
+
+               # Remove old configuration directory.
+               rm -rf "/var/ipfire/snort"
+       fi
+
        return 0
 }