From 5acb54c2679e8140372f56de2078463c2467ecff Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 16 Apr 2024 14:01:31 +0200 Subject: [PATCH] ovpnmain.cgi: Restart instead of reload 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 --- html/cgi-bin/ovpnmain.cgi | 4 ++-- src/initscripts/system/openvpn-rw | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 018b50370..3c41fd7af 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -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"); } } diff --git a/src/initscripts/system/openvpn-rw b/src/initscripts/system/openvpn-rw index 6e5fd8a3b..49b01daca 100644 --- a/src/initscripts/system/openvpn-rw +++ b/src/initscripts/system/openvpn-rw @@ -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 -- 2.47.3