]> 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>
Mon, 2 Jun 2025 19:46:39 +0000 (19:46 +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 018b50370b4f8f7204308d7008fd5708036d902e..3c41fd7af74136ae8dcb198a6612d8016b437e2c 100644 (file)
@@ -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