]> 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>
Mon, 23 Sep 2024 11:07:15 +0000 (13:07 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi

index 2e6a215078b2bb807b0ceec37f15b7d19497ca9b..c71be02f8a7797fd3e7be73dc27101b911c4d5be 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();
 }
 
 ###