public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI
@ 2024-12-14 17:47 Adolf Belka
  2024-12-14 17:47 ` [DEV PATCH 2/3] services.cgi: Allow the openvpn-rw status to be shown in the Services WUI page Adolf Belka
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Adolf Belka @ 2024-12-14 17:47 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]

- 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 WUI page

Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 html/cgi-bin/ovpnmain.cgi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 mode change 100755 => 100644 html/cgi-bin/ovpnmain.cgi

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  <info(a)ipfire.org>                     #
+# Copyright (C) 2007-2024  IPFire Team  <info(a)ipfire.org>                     #
 #                                                                             #
 # 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'} => {
-			"process" => "openvpn",
-			"pidfile" => "/var/run/openvpn.pid",
+			"process" => "openvpn-rw",
+			"pidfile" => "/var/run/openvpn-rw.pid"
 		}
 	});
 
-- 
2.47.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [DEV PATCH 2/3] services.cgi: Allow the openvpn-rw status to be shown in the Services WUI page
  2024-12-14 17:47 [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI Adolf Belka
@ 2024-12-14 17:47 ` Adolf Belka
  2024-12-14 17:47 ` [DEV PATCH 3/3] openvpn-rw: Correct typo in openvpn-rw initscript Adolf Belka
  2024-12-14 18:04 ` [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI Adolf Belka
  2 siblings, 0 replies; 4+ messages in thread
From: Adolf Belka @ 2024-12-14 17:47 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

- 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 Services WUI page

Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 html/cgi-bin/services.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi
index a3ae13c78..734f08e11 100644
--- a/html/cgi-bin/services.cgi
+++ b/html/cgi-bin/services.cgi
@@ -113,8 +113,8 @@ $querry[1] = 'hour' unless defined $querry[1];
 
 		# OpenVPN Roadwarrior
 		$Lang::tr{'ovpn roadwarrior server'} => {
-			"process" => "openvpn",
-			"pidfile" => "/var/run/openvpn.pid",
+			"process" => "openvpn-rw",
+			"pidfile" => "/var/run/openvpn-rw.pid",
 		}
 	});
 
-- 
2.47.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [DEV PATCH 3/3] openvpn-rw: Correct typo in openvpn-rw initscript
  2024-12-14 17:47 [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI Adolf Belka
  2024-12-14 17:47 ` [DEV PATCH 2/3] services.cgi: Allow the openvpn-rw status to be shown in the Services WUI page Adolf Belka
@ 2024-12-14 17:47 ` Adolf Belka
  2024-12-14 18:04 ` [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI Adolf Belka
  2 siblings, 0 replies; 4+ messages in thread
From: Adolf Belka @ 2024-12-14 17:47 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 src/initscripts/system/openvpn-rw | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/initscripts/system/openvpn-rw b/src/initscripts/system/openvpn-rw
index 49b01daca..e0483e4b1 100644
--- a/src/initscripts/system/openvpn-rw
+++ b/src/initscripts/system/openvpn-rw
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2022  IPFire Team  <info(a)ipfire.org>                     #
+# Copyright (C) 2007-2024  IPFire Team  <info(a)ipfire.org>                     #
 #                                                                             #
 # 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        #
@@ -54,7 +54,7 @@ case "${1}" in
 
 	stop)
 		boot_mesg "Stopping OpenVPN Authenticator..."
-		PIDFILE= killproc /usr/sbin/openvon-authenticator
+		PIDFILE= killproc /usr/sbin/openvpn-authenticator
 
 		boot_mesg "Stopping OpenVPN Roadwarrior Server..."
 		killproc /usr/sbin/openvpn
-- 
2.47.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI
  2024-12-14 17:47 [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI Adolf Belka
  2024-12-14 17:47 ` [DEV PATCH 2/3] services.cgi: Allow the openvpn-rw status to be shown in the Services WUI page Adolf Belka
  2024-12-14 17:47 ` [DEV PATCH 3/3] openvpn-rw: Correct typo in openvpn-rw initscript Adolf Belka
@ 2024-12-14 18:04 ` Adolf Belka
  2 siblings, 0 replies; 4+ messages in thread
From: Adolf Belka @ 2024-12-14 18:04 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 2998 bytes --]

Hi Michael,

This patch set allows the status of the openvpn roadwarrior to be shown on the 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 Openvpn WUI page it restarts the openvpn rw server but then fails to restart properly. It shuts down the openvpn-authenticator with an OK but for the openvpn daemon it shows FAIL.

The daemon is actually stopped but the openvpn-rw.pid file is not removed from 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 running.

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 anything 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 be 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 WUI page
> 
> Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
> Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
> ---
>   html/cgi-bin/ovpnmain.cgi | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>   mode change 100755 => 100644 html/cgi-bin/ovpnmain.cgi
> 
> 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  <info(a)ipfire.org>                     #
> +# Copyright (C) 2007-2024  IPFire Team  <info(a)ipfire.org>                     #
>   #                                                                             #
>   # 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'} => {
> -			"process" => "openvpn",
> -			"pidfile" => "/var/run/openvpn.pid",
> +			"process" => "openvpn-rw",
> +			"pidfile" => "/var/run/openvpn-rw.pid"
>   		}
>   	});
>   


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-14 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-14 17:47 [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI Adolf Belka
2024-12-14 17:47 ` [DEV PATCH 2/3] services.cgi: Allow the openvpn-rw status to be shown in the Services WUI page Adolf Belka
2024-12-14 17:47 ` [DEV PATCH 3/3] openvpn-rw: Correct typo in openvpn-rw initscript Adolf Belka
2024-12-14 18:04 ` [DEV PATCH 1/3] ovpnmain.cgi: Allow the openvpn-rw status to be shown in openvpn WUI Adolf Belka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox