From: Michael Tremer Date: Tue, 16 Apr 2024 12:01:31 +0000 (+0200) Subject: ovpnmain.cgi: Restart instead of reload X-Git-Tag: v2.29-core197~25^2~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5acb54c2679e8140372f56de2078463c2467ecff;p=ipfire-2.x.git 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 --- 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