]> 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>
Tue, 16 Apr 2024 12:01:31 +0000 (14:01 +0200)
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 390af45a6f534e5ca2a26beaa1cc52456aed73ea..3b4076d565c975319d9ed9f9d0086033b12a04e7 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