]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
suricata-reporter: Move the configuration from suricata
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 1 Sep 2025 15:32:02 +0000 (15:32 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Sep 2025 17:50:42 +0000 (17:50 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/common/suricata
config/rootfiles/common/suricata-reporter
config/suricata/reporter.conf [deleted file]
lfs/suricata
lfs/suricata-reporter

index c961b21f20624230f0b33e1f8f57d6e5888e835e..db14813873e35b8d291e2f562a9f33e2b96c81c5 100644 (file)
@@ -55,7 +55,6 @@ usr/share/suricata
 #usr/share/suricata/threshold.config
 var/cache/suricata
 var/cache/suricata/sgh
-var/ipfire/suricata/reporter.conf
 var/lib/suricata
 #var/lib/suricata/cache
 #var/lib/suricata/cache/sgh
index ce47de740ffb28134cd8cb9833d2487cb4313459..e38c64c9bb4df01ab058a290d8e0084ab13e78f7 100644 (file)
@@ -7,3 +7,4 @@ usr/bin/suricata-report-generator
 usr/share/locale/de_DE
 usr/share/locale/de_DE/LC_MESSAGES
 usr/share/locale/de_DE/LC_MESSAGES/suricata-reporter.mo
+var/ipfire/suricata/reporter.conf
diff --git a/config/suricata/reporter.conf b/config/suricata/reporter.conf
deleted file mode 100644 (file)
index 071e4ca..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-;
-; Example configuration file for the Suricata Reporter
-; 
-; This application receives events from Suricata to generate reports,
-; alert emails and store a history of alerts.
-;
-[DEFAULT]
-; The number of worker processes to spawn.
-; Default is to launch one worker per CPU core.
-;workers = 4
-
-; The socket where to receive events from
-;socket = /var/run/suricata/reporter.socket
-
-; The ownership of the socket
-;user = suricata
-;group = suricata
-
-; The path to the database
-;database = /var/log/suricata/reporter.db
-
-[syslog]
-; Enable sending any alerts to syslog in the human-reable fast.log format
-;enabled = true
-
-[email]
-; Enable sending an alert email for each alert
-;enabled = true
-
-; The sender email address
-;sender = no-reply@ipfire.org
-
-; The recipient email addresses. Use comma separation for more reciepients.
-;recipients = john.doe@example.com, jane.doe@example.com
index 576c62e22b6622ae41e601bc8d93e9e0eccacd7b..3e6619da04e32868b7173cdce8912aba792cd0a5 100644 (file)
@@ -138,9 +138,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        # Install the reporter
        install -v -m 755 $(DIR_SRC)/config/suricata/suricata-reporter /usr/bin/suricata-reporter
-       install -v -m 644 $(DIR_SRC)/config/suricata/reporter.conf \
-               /var/ipfire/suricata/reporter.conf
-       chown -v nobody:nobody /var/ipfire/suricata/reporter.conf
 
        # Install the cron script
        install -v -m 755 $(DIR_SRC)/config/suricata/suricata-report-cron \
index 20316ff94d216ff4415e5819901a5d732fe6ca1c..4d015248d25fc21e43b72f22dc159cc43153f9bc 100644 (file)
@@ -76,5 +76,15 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
                        --sysconfdir=/etc
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
+
+       # Move the configuration file so that it can be edited by the user
+       # and will be included in the backup
+       mv -v /etc/suricata/reporter.conf \
+               /var/ipfire/suricata/reporter.conf
+       ln -svf --relative \
+               /var/ipfire/suricata/reporter.conf \
+               /etc/suricata/reporter.conf
+       chown nobody:nobody /var/ipfire/suricata/reporter.conf
+
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)