From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Cc: Adolf Belka <adolf.belka@ipfire.org>
Subject: [PATCH 2/2] backup.pl: Update the RW entry in collectd.vpn if restoring old backup
Date: Mon, 8 Sep 2025 14:59:38 +0200 [thread overview]
Message-ID: <20250908125938.3389609-2-adolf.belka@ipfire.org> (raw)
In-Reply-To: <20250908125938.3389609-1-adolf.belka@ipfire.org>
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
prev parent reply other threads:[~2025-09-08 12:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250908125938.3389609-2-adolf.belka@ipfire.org \
--to=adolf.belka@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox