* [PATCH 1/2] update.sh: Update collectd.vpn to the new RW log file name
@ 2025-09-08 12:59 Adolf Belka
2025-09-08 12:59 ` [PATCH 2/2] backup.pl: Update the RW entry in collectd.vpn if restoring old backup Adolf Belka
0 siblings, 1 reply; 2+ messages in thread
From: Adolf Belka @ 2025-09-08 12:59 UTC (permalink / raw)
To: development; +Cc: Adolf Belka
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
config/rootfiles/core/197/update.sh | 5 +++++
1 file changed, 5 insertions(+)
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
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] backup.pl: Update the RW entry in collectd.vpn if restoring old backup
2025-09-08 12:59 [PATCH 1/2] update.sh: Update collectd.vpn to the new RW log file name Adolf Belka
@ 2025-09-08 12:59 ` Adolf Belka
0 siblings, 0 replies; 2+ messages in thread
From: Adolf Belka @ 2025-09-08 12:59 UTC (permalink / raw)
To: development; +Cc: Adolf Belka
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
config/backup/backup.pl | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/config/backup/backup.pl b/config/backup/backup.pl
index e79f510c6..8988427ea 100644
--- a/config/backup/backup.pl
+++ b/config/backup/backup.pl
@@ -349,8 +349,12 @@ restore_backup() {
rm /var/log/pakfire.log
fi
- # Update the OpenVPN configuration and restart the openvpn daemons
+ # Update the OpenVPN configuration, update the RW log entry in collectd.vpn
+ # if it is the old name and restart the openvpn daemons
sudo -u nobody /srv/web/ipfire/cgi-bin/ovpnmain.cgi
+ 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
/etc/init.d/openvpn-n2n restart
/etc/init.d/openvpn-rw restart
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-08 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-08 12:59 [PATCH 1/2] update.sh: Update collectd.vpn to the new RW log file name Adolf Belka
2025-09-08 12:59 ` [PATCH 2/2] backup.pl: Update the RW entry in collectd.vpn if restoring old backup Adolf Belka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox