]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
tor.cgi: Use new perl system functions
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Jun 2021 14:01:36 +0000 (15:01 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Jun 2021 14:01:36 +0000 (15:01 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/tor.cgi

index f39c0d8da0677110f2de3ab974e63974d911051a..3349336aea003c2fd4d9603a11fe390d6c95a0fb 100644 (file)
@@ -873,9 +873,9 @@ sub BuildConfiguration() {
 
        # Restart the service.
        if (($settings{'TOR_ENABLED'} eq 'on') || ($settings{'TOR_RELAY_ENABLED'} eq 'on')) {
-               system("/usr/local/bin/torctrl restart &>/dev/null");
+               &General::system("/usr/local/bin/torctrl", "restart");
        } else {
-               system("/usr/local/bin/torctrl stop &>/dev/null");
+               &General::system("/usr/local/bin/torctrl", "stop");
        }
        # Update pid and memory
        daemonstats();