public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, master, updated. 8d611ffd0424ba20aac45f63f5bdaa398b4cb557
Date: Thu, 14 Aug 2025 10:03:56 +0000 (UTC)	[thread overview]
Message-ID: <4c2gn84fn4z2xHR@people01.haj.ipfire.org> (raw)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, master has been updated
       via  8d611ffd0424ba20aac45f63f5bdaa398b4cb557 (commit)
       via  3e82d9990cbdd4b0f022e16aecec164008926717 (commit)
       via  4c0b4194ff24e4ddeb8a1311facfec71d2101a39 (commit)
      from  87e1047a08ca522f28807b3fde7a2f2faa75b733 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8d611ffd0424ba20aac45f63f5bdaa398b4cb557
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Aug 14 11:03:04 2025 +0100

    core197: Rewrite the entire OpenVPN server configuration
    
    This also updates all CCD configuration files.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 3e82d9990cbdd4b0f022e16aecec164008926717
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Aug 14 11:01:23 2025 +0100

    ovpnmain.cgi: Add option to rewrite all configuration files
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 4c0b4194ff24e4ddeb8a1311facfec71d2101a39
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Aug 14 11:01:10 2025 +0100

    ovpnmain.cgi: Disable logging warnings
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/backup/backup.pl             | 27 +--------------------------
 config/rootfiles/core/197/update.sh | 27 +--------------------------
 html/cgi-bin/ovpnmain.cgi           | 10 ++++++++--
 3 files changed, 10 insertions(+), 54 deletions(-)

Difference in files:
diff --git a/config/backup/backup.pl b/config/backup/backup.pl
index ed7a68455..c9bc14355 100644
--- a/config/backup/backup.pl
+++ b/config/backup/backup.pl
@@ -350,32 +350,7 @@ restore_backup() {
 	fi
 
 	# Update the OpenVPN configuration
-	sed -r \
-		-e "s/^writepid .*/writepid \/var\/run\/openvpn-rw.pid/" \
-		-e "/ncp-disable/d" \
-		-e "s/^cipher (.*)/data-ciphers-fallback \1/" \
-		-e "s/^status .*/status \/var\/run\/openvpn-rw.log/" \
-		-i /var/ipfire/ovpn/server.conf
-
-	# Change to the subnet topology
-	if ! grep -q "topology subnet" /var/ipfire/ovpn/server.conf; then
-		echo "topology subnet" >> /var/ipfire/ovpn/server.conf
-	fi
-
-	# Migrate away from compression
-	if ! grep -q "compress migrate" /var/ipfire/ovpn/server.conf; then
-		echo "compress migrate" >> /var/ipfire/ovpn/server.conf
-	fi
-
-	# Enable the legacy provider (just in case)
-	if ! grep -q "providers legacy default" /var/ipfire/ovpn/server.conf; then
-		echo "providers legacy default" >> /var/ipfire/ovpn/server.conf
-	fi
-
-	# Enable explicit exit notification
-	if ! grep -q "explicit-exit-notify" /var/ipfire/ovpn/server.conf; then
-		echo "explicit-exit-notify" >> /var/ipfire/ovpn/server.conf
-	fi
+	sudo -u nobody /srv/web/ipfire/cgi-bin/ovpnmain.cgi
 
 	return 0
 }
diff --git a/config/rootfiles/core/197/update.sh b/config/rootfiles/core/197/update.sh
index dc9149499..0fd5cc6f0 100644
--- a/config/rootfiles/core/197/update.sh
+++ b/config/rootfiles/core/197/update.sh
@@ -123,32 +123,7 @@ ldconfig
 /usr/local/bin/filesystem-cleanup
 
 # Update the OpenVPN configuration
-sed -r \
-	-e "s/^writepid .*/writepid \/var\/run\/openvpn-rw.pid/" \
-	-e "/ncp-disable/d" \
-	-e "s/^cipher (.*)/data-ciphers-fallback \1/" \
-	-e "s/^status .*/status \/var\/run\/openvpn-rw.log/" \
-	-i /var/ipfire/ovpn/server.conf
-
-# Change to the subnet topology
-if ! grep -q "topology subnet" /var/ipfire/ovpn/server.conf; then
-	echo "topology subnet" >> /var/ipfire/ovpn/server.conf
-fi
-
-# Migrate away from compression
-if ! grep -q "compress migrate" /var/ipfire/ovpn/server.conf; then
-	echo "compress migrate" >> /var/ipfire/ovpn/server.conf
-fi
-
-# Enable the legacy provider (just in case)
-if ! grep -q "providers legacy default" /var/ipfire/ovpn/server.conf; then
-	echo "providers legacy default" >> /var/ipfire/ovpn/server.conf
-fi
-
-# Enable explicit exit notification
-if ! grep -q "explicit-exit-notify" /var/ipfire/ovpn/server.conf; then
-	echo "explicit-exit-notify" >> /var/ipfire/ovpn/server.conf
-fi
+sudo -u nobody /srv/web/ipfire/cgi-bin/ovpnmain.cgi
 
 # Apply SSH configuration
 /usr/local/bin/sshctrl
diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index 1fe0978c6..83f9fdc02 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -41,8 +41,8 @@ require "${General::swroot}/countries.pl";
 require "${General::swroot}/location-functions.pl";
 
 # enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
 
 my %mainsettings = ();
 &General::readhash("${General::swroot}/main/settings", \%mainsettings);
@@ -1001,6 +1001,12 @@ sub openvpn_status($) {
 	return $status;
 }
 
+# Hook to regenerate the configuration files
+if ($ENV{"REMOTE_ADDR"} eq "") {
+	&writeserverconf();
+	exit(0);
+}
+
 ###
 ### Save Advanced options
 ###


hooks/post-receive
--
IPFire 2.x development tree


                 reply	other threads:[~2025-08-14 10:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4c2gn84fn4z2xHR@people01.haj.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@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