[1/2] update.sh: Update collectd.vpn to the new RW log file name

Message ID 20250908125938.3389609-1-adolf.belka@ipfire.org
State New
Headers
Series [1/2] update.sh: Update collectd.vpn to the new RW log file name |

Commit Message

Adolf Belka 8 Sep 2025, 12:59 p.m. UTC
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/core/197/update.sh | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/config/rootfiles/core/197/update.sh b/config/rootfiles/core/197/update.sh
index 0fd5cc6f0..0c5e226eb 100644
--- a/config/rootfiles/core/197/update.sh
+++ b/config/rootfiles/core/197/update.sh
@@ -125,6 +125,11 @@  ldconfig
 # Update the OpenVPN configuration
 sudo -u nobody /srv/web/ipfire/cgi-bin/ovpnmain.cgi
 
+# Replace the OpenVPN RW log name in collectd.vpn
+if grep -q "/var/run/ovpnserver.log" /var/ipfire/ovpn/collectd.vpn; then
+	sed -i 's|"/var/run/ovpnserver.log"|"/var/run/openvpn-rw.log"|' /var/ipfire/ovpn/collectd.vpn
+fi
+
 # Apply SSH configuration
 /usr/local/bin/sshctrl