[2/2] update.sh: Ensure ncp-disable is removed from config and DATACIPHERS added

Message ID 20250825091914.5761-2-adolf.belka@ipfire.org
State New
Headers
Series [1/2] backup.pl: Ensure ncp-disable is removed from old backups and DATACIPHERS added |

Commit Message

Adolf Belka 25 Aug 2025, 9:19 a.m. UTC
- This is doing the same thing as the other patch of this series dealing with backup.pl

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/core/197/update.sh | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/config/rootfiles/core/197/update.sh b/config/rootfiles/core/197/update.sh
index 0fd5cc6f0..f1800b2c0 100644
--- a/config/rootfiles/core/197/update.sh
+++ b/config/rootfiles/core/197/update.sh
@@ -123,6 +123,10 @@  ldconfig
 /usr/local/bin/filesystem-cleanup
 
 # Update the OpenVPN configuration
+if grep -q "ncp-disable" /var/ipfire/ovpn/server.conf; then
+	sed -r -e "/ncp-disable/d" -i /var/ipfire/ovpn/server.conf
+	echo "DATACIPHERS=AES-256-GCM|AES-128-GCM|CHACHA20-POLY1305" >> /var/ipfire/ovpn/settings
+fi
 sudo -u nobody /srv/web/ipfire/cgi-bin/ovpnmain.cgi
 
 # Apply SSH configuration