]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
ovpnmain.cgi: Don't mess with the OpenVPN status file
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Mar 2024 15:51:29 +0000 (16:51 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Dec 2024 19:58:31 +0000 (19:58 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi

index aaa56c8a65ced8b93fd15eb03d2258b0233bb55d..08aa20e55fd895a1ab4b42bf404b0a9f7e7f4151 100755 (executable)
@@ -314,15 +314,6 @@ sub writeserverconf {
     close(CONF);
 }
 
-sub emptyserverlog{
-    if (open(FILE, ">/var/run/ovpnserver.log")) {
-       flock FILE, 2;
-       print FILE "";
-       close FILE;
-    }
-
-}
-
 sub delccdnet
 {
        my %ccdconfhash = ();
@@ -662,12 +653,10 @@ sub writecollectdconf {
 ###
 
 if ($cgiparams{'ACTION'} eq $Lang::tr{'start ovpn server'}) {
-       &emptyserverlog();
        &General::system("/usr/local/bin/openvpnctrl", "-s");
 
 } elsif ($cgiparams{'ACTION'} eq $Lang::tr{'stop ovpn server'}) {
        &General::system("/usr/local/bin/openvpnctrl", "-k");
-       &emptyserverlog();
 }
 
 ###