From: Erik Kapfer <ummeegge@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] OpenVPN: Add to update and exclude
Date: Fri, 17 Apr 2020 16:34:59 +0000 [thread overview]
Message-ID: <20200417163459.10032-1-ummeegge@ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]
Since some OpenVPN updates did not apply, the service will be stopped before the update to prevent 'Text file busy' and start up again.
Signed-off-by: Erik Kapfer <ummeegge(a)ipfire.org>
---
config/rootfiles/core/144/exclude | 1 +
config/rootfiles/core/144/update.sh | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/config/rootfiles/core/144/exclude b/config/rootfiles/core/144/exclude
index b22159878..ba1b646e6 100644
--- a/config/rootfiles/core/144/exclude
+++ b/config/rootfiles/core/144/exclude
@@ -24,5 +24,6 @@ var/lib/alternatives
var/log/cache
var/log/dhcpcd.log
var/log/messages
+var/ipfire/ovpn
var/state/dhcp/dhcpd.leases
var/updatecache
diff --git a/config/rootfiles/core/144/update.sh b/config/rootfiles/core/144/update.sh
index 6a9c51931..81a6c626e 100644
--- a/config/rootfiles/core/144/update.sh
+++ b/config/rootfiles/core/144/update.sh
@@ -47,6 +47,15 @@ done
# Remove files
# Stop services
+# Stop OpenVPN server if it runs
+if pgrep openvpn -fl | grep 'server.conf' >/dev/null 2>&1; then
+ /usr/local/bin/openvpnctrl -k
+fi
+
+# Stop OpenVPN N2N if it runs
+if pgrep openvpn -fl | grep 'n2nconf' >/dev/null 2>&1; then
+ /usr/local/bin/openvpnctrl -kn2n
+fi
# Extract files
extract_files
@@ -55,6 +64,9 @@ extract_files
ldconfig
# Start services
+# Start OpenVPN again
+/usr/local/bin/openvpnctrl -s
+/usr/local/bin/openvpnctrl -sn2n
# Update Language cache
/usr/local/bin/update-lang-cache
--
2.20.1
next reply other threads:[~2020-04-17 16:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 16:34 Erik Kapfer [this message]
2020-04-17 17:41 ` Michael Tremer
2020-04-17 18:59 ` ummeegge
2020-05-07 10:46 ` [PATCH v2 1/2] OpenVPN: Update to version 2.4.9 Erik Kapfer
2020-05-07 10:46 ` [PATCH v2 2/2] update.sh: Stop|Start OpenVPN for update Erik Kapfer
2020-05-14 12:40 ` [PATCH v2 1/2] OpenVPN: Update to version 2.4.9 ummeegge
2020-05-14 14:38 ` Michael Tremer
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=20200417163459.10032-1-ummeegge@ipfire.org \
--to=ummeegge@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