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 3accbcf..5737740 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
 }