From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI Date: Sat, 14 Dec 2024 19:04:26 +0100 Message-ID: In-Reply-To: <20241214174718.22140-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5365331087638465314==" List-Id: --===============5365331087638465314== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Michael, This patch set allows the status of the openvpn roadwarrior to be shown on th= e OpenVPN and Services WUI pages when you first enable or when you reboot and= also fixes a typo. However, if the server is actually running by checking the init.d status and = the WUI page says it is running, if I then press the Save button on the Openv= pn WUI page it restarts the openvpn rw server but then fails to restart prope= rly. It shuts down the openvpn-authenticator with an OK but for the openvpn d= aemon it shows FAIL. The daemon is actually stopped but the openvpn-rw.pid file is not removed fro= m the /var/run directory and so it gives a FAIL result. This also then stops = the server starting back up as the pid file is there but openvpn is not runni= ng. I have tried the above also with the init.d commands from the cli. I have tried various changes to the initscript and have been unable to find a= nything that will remove the pid file as part of the killproc step. I tried out having killproc -p /var/run/openvpn-rw.pid /usr/sbin/openvpn and = the pid file was still left behind after the killproc step. I don't understand enough about the pid things in the IPFire initscripts to b= e able to fault find this any further. Sorry. Regards, Adolf. On 14/12/2024 18:47, Adolf Belka wrote: > - The main openvpn process name has been changed to openvpn-rw. This change= is needed > so that if openvpn-rw is running the status shows that on the OpenVPN W= UI page >=20 > Tested-by: Adolf Belka > Signed-off-by: Adolf Belka > --- > html/cgi-bin/ovpnmain.cgi | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > mode change 100755 =3D> 100644 html/cgi-bin/ovpnmain.cgi >=20 > diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi > old mode 100755 > new mode 100644 > index bd102f4bc..843edc519 > --- a/html/cgi-bin/ovpnmain.cgi > +++ b/html/cgi-bin/ovpnmain.cgi > @@ -2,7 +2,7 @@ > #########################################################################= ###### > # = # > # IPFire.org - A linux based firewall = # > -# Copyright (C) 2007-2023 IPFire Team = # > +# Copyright (C) 2007-2024 IPFire Team = # > # = # > # This program is free software: you can redistribute it and/or modify = # > # it under the terms of the GNU General Public License as published by = # > @@ -5063,8 +5063,8 @@ END > # Show the service status > &Header::ServiceStatus({ > $Lang::tr{'ovpn roadwarrior server'} =3D> { > - "process" =3D> "openvpn", > - "pidfile" =3D> "/var/run/openvpn.pid", > + "process" =3D> "openvpn-rw", > + "pidfile" =3D> "/var/run/openvpn-rw.pid" > } > }); > =20 --===============5365331087638465314==--