From 7da35304c650d7fc0925a457d94b75a42f6ecd78 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 17 May 2021 19:50:15 +0100 Subject: [PATCH] guardian: Use new system methods Signed-off-by: Michael Tremer --- html/cgi-bin/guardian.cgi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/html/cgi-bin/guardian.cgi b/html/cgi-bin/guardian.cgi index 552c672111..8ffe57f113 100644 --- a/html/cgi-bin/guardian.cgi +++ b/html/cgi-bin/guardian.cgi @@ -67,8 +67,8 @@ my $settingsfile = "${General::swroot}/guardian/settings"; 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 = (); @@ -878,7 +878,7 @@ sub BuildConfiguration() { 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"); @@ -940,11 +940,11 @@ sub BuildConfiguration() { &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"); } } @@ -955,7 +955,7 @@ sub GenerateIgnoreFile() { &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"); -- 2.39.5