my $ignoredfile = "${General::swroot}/guardian/ignored";
# Create empty settings and ignoredfile if they do not exist yet.
-unless (-e "$settingsfile") { system("touch $settingsfile"); }
-unless (-e "$ignoredfile") { system("touch $ignoredfile"); }
+unless (-e "$settingsfile") { &General::system("touch", "$settingsfile"); }
+unless (-e "$ignoredfile") { &General::system("touch", "$ignoredfile"); }
our %settings = ();
our %ignored = ();
my $configfile = "${General::swroot}/guardian/guardian.conf";
# Create the configfile if none exists yet.
- unless (-e "$configfile") { system("touch $configfile"); }
+ unless (-e "$configfile") { &General::system("touch", "$configfile"); }
# Open configfile for writing.
open(FILE, ">$configfile");
&Guardian::Socket::Client("reload");
} else {
# Launch guardian.
- system("/usr/local/bin/addonctrl guardian start &>/dev/null");
+ &General::system("/usr/local/bin/addonctrl", "guardian", "start");
}
} else {
# Stop the daemon.
- system("/usr/local/bin/addonctrl guardian stop &>/dev/null");
+ &General::system("/usr/local/bin/addonctrl", "guardian", "stop");
}
}
&General::readhasharray($ignoredfile, \%ignored);
# Create the guardian.ignore file if not exist yet.
- unless (-e "$ignorefile") { system("touch $ignorefile"); }
+ unless (-e "$ignorefile") { &General::system("touch", "$ignorefile"); }
# Open ignorefile for writing.
open(FILE, ">$ignorefile");