mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 19:55:52 +02:00
guardian.cgi: Create config and ignore file if they does not exist.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -869,6 +869,9 @@ sub BuildConfiguration() {
|
||||
|
||||
my $configfile = "${General::swroot}/guardian/guardian.conf";
|
||||
|
||||
# Create the configfile if not exist yet.
|
||||
unless (-e "$configfile") { system("touch $configfile"); }
|
||||
|
||||
# Open configfile for writing.
|
||||
open(FILE, ">$configfile");
|
||||
|
||||
@@ -944,6 +947,9 @@ sub GenerateIgnoreFile() {
|
||||
# Read-in ignoredfile.
|
||||
&General::readhasharray($ignoredfile, \%ignored);
|
||||
|
||||
# Create the guardian.ignore file if not exist yet.
|
||||
unless (-e "$ignorefile") { system("touch $ignorefile"); }
|
||||
|
||||
# Open ignorefile for writing.
|
||||
open(FILE, ">$ignorefile");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user