]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
ovpnmain.cgi: Restart instead of reload
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 16 Apr 2024 12:01:31 +0000 (14:01 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Dec 2024 20:01:42 +0000 (20:01 +0000)
The option to reload the server does not seem to work well. The running
is process is performing a number of checks that make very little sense
and PID files get written by the user that launches the process (i.e.
root) instead of the user that the process is running as later on (i.e.
nobody). Since there is no chance to keep any existing connections alive
this way, we may just as well restart the service for now.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi
src/initscripts/system/openvpn-rw

index 2b55a1d7200e3b8d5d0f1556e5e0d9658b47f319..512a6785a9e84bcbd0ad04002c4736572e8328c9 100755 (executable)
@@ -1119,9 +1119,9 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save-adv-options'}) {
        # Write the server configuration
        &writeserverconf();
 
-       # Reload the server if it is enabled
+       # Restart the server if it is enabled
        if ($vpnsettings{'ENABLED'} eq "on") {
-               &General::system("/usr/local/bin/openvpnctrl", "rw", "reload");
+               &General::system("/usr/local/bin/openvpnctrl", "rw", "restart");
        }
 }
 
index 6e5fd8a3b67c991c4ee5161ee3dba6343f120953..49b01daca5e2b76892ef0340dda32c6bcd991457 100644 (file)
@@ -63,11 +63,6 @@ case "${1}" in
                iptables -F OVPNINPUTRW
                ;;
 
-       reload)
-               boot_mesg "Reloading OpenVPN Roadwarrior Server..."
-               reloadproc /usr/sbin/openvpn
-               ;;
-
        restart)
                ${0} stop
                sleep 1