From: Michael Tremer Date: Tue, 3 Jun 2025 14:06:03 +0000 (+0200) Subject: ovpnmain.cgi: Use the helper binary to read the status log X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63ebd7e54cb5661a423c67d564c947ffb55e8321;p=people%2Fms%2Fipfire-2.x.git ovpnmain.cgi: Use the helper binary to read the status log Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index adf09029b..dfa47ad62 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -3089,7 +3089,7 @@ END END - open(FILE, $RW_STATUS) or die "Unable to open $RW_STATUS: $!"; + open(FILE, "/usr/local/bin/openvpnctrl rw log |") or die "Unable to open $RW_STATUS: $!"; my @current = ; close(FILE); diff --git a/src/initscripts/system/openvpn-rw b/src/initscripts/system/openvpn-rw index 49b01daca..df83e47b7 100644 --- a/src/initscripts/system/openvpn-rw +++ b/src/initscripts/system/openvpn-rw @@ -73,6 +73,12 @@ case "${1}" in statusproc /usr/sbin/openvpn ;; + log) + if [ -r "/var/run/openvpn-rw.log" ]; then + cat "/var/run/openvpn-rw.log" + fi + ;; + *) echo "Usage: ${0} {start|stop|reload|restart|status}" exit 1