From patchwork Fri Apr 17 16:34:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ummeegge X-Patchwork-Id: 2978 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 493hXH01dpz3xQt for ; Fri, 17 Apr 2020 16:35:10 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 493hXF4K5hzgv; Fri, 17 Apr 2020 16:35:09 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 493hXD6sZRz2yjL; Fri, 17 Apr 2020 16:35:08 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 493hXC0mdgz2y3R for ; Fri, 17 Apr 2020 16:35:07 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 493hXB4XqQzgv; Fri, 17 Apr 2020 16:35:06 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1587141306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SHfToAi0Y5bCvGNmleRj29Aet3oMoDc6YX52JqnviiM=; b=jM4SsvZNLIo/vh7U/lowYNvc6eveePiFYkygtRjj+e2FogqylWt2nM5Jyhp/JYpcQiubWk Z3lBkEpFMBC5ppCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1587141306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SHfToAi0Y5bCvGNmleRj29Aet3oMoDc6YX52JqnviiM=; b=eDWU3CJNzkqcydU9wI1Gffw68K8FEXCHv3OqF9LtyYskmEPpqISXVpR9S1TdEL1/sWdXlK xMJx087TeCh/zbwomjvYxtn+ghcRnOMT9UEj/xm9azIXmNavRL9DAWP0dOwnr2mfFVY2wf wUn9SxXcqrBNE5FCC3ypRCDJhbhUnLeNjyRpxj4Pu5BNqQ0W5K6b+ipwOCO2FFyWO4cSlX 0rmtXXy491IsyNgcwPMBrCpQfvO/rkgQ0Jg8o3hG1j0M1X+39wdTJqKmjy+rftMGBoJOvg cUMfIL7RsBJyLLtCvhrENX3B0THYl2RSuqASl6OF0yicAgaJgEavdbx/qd4rEg== From: Erik Kapfer To: development@lists.ipfire.org Subject: [PATCH] OpenVPN: Add to update and exclude Date: Fri, 17 Apr 2020 16:34:59 +0000 Message-Id: <20200417163459.10032-1-ummeegge@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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 --- 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 From patchwork Thu May 7 10:46:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ummeegge X-Patchwork-Id: 3058 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 49Hqrs1WY9z3xSR for ; Thu, 7 May 2020 10:46:37 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 49Hqrq1PyDz3Pm; Thu, 7 May 2020 10:46:35 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 49Hqrp5Dt3z30FR; Thu, 7 May 2020 10:46:34 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 49Hqrm415Vz2xcW for ; Thu, 7 May 2020 10:46:32 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 49Hqrm25CFz1Hm; Thu, 7 May 2020 10:46:32 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1588848392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=Y4jRfvuLQwvAflORzM1l1bOU4AhDgb3eQNqdUV9lcd8=; b=HYqSRudBNgw3rgOoiqxJL7w07Wmu4XWAKXwRXAFG8baCBtUcV/blOD9Y2DczYojP2NV5d3 GtajNKAAJ9tnEZBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1588848392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=Y4jRfvuLQwvAflORzM1l1bOU4AhDgb3eQNqdUV9lcd8=; b=gq6x5q82pujsgJ5kF+uCbF8ucPgSq7PtvHb2cYrcTRz9hK/SoxUThBnig72pLuAfH5vXmW YRhCd5IgjRivlDyZhLVXSaKj5dqbH8rHQbIRCeA7J9SENfqGJ1QZTvwkHfSXyqce4lHKSa +/ed0ScznMSxNeRDNizaxJj/jezWB9MR27EmV42/gPHqgN/gqGRmGHfiRPaaZ0+4OHSYJC 7ss8up+reC6sCt8v6Iit9YtmqsNoMPmp488xTV5fdSRPLBXq5rZgbGa8V/NvpSSZytASWP 3doYjSgTV3uBg/3CB5lLDRRSl79sEUX6Shvyxc843Dir8Ml32+LHhv918DseHQ== From: Erik Kapfer To: development@lists.ipfire.org Subject: [PATCH v2 2/2] update.sh: Stop|Start OpenVPN for update Date: Thu, 7 May 2020 12:46:16 +0200 Message-Id: <20200507104616.11573-2-ummeegge@ipfire.org> In-Reply-To: <20200507104616.11573-1-ummeegge@ipfire.org> References: <20200417163459.10032-1-ummeegge@ipfire.org> <20200507104616.11573-1-ummeegge@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=ummeegge@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Erik Kapfer --- config/rootfiles/core/145/update.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/rootfiles/core/145/update.sh b/config/rootfiles/core/145/update.sh index 2571fa3b3..4b9468a49 100644 --- a/config/rootfiles/core/145/update.sh +++ b/config/rootfiles/core/145/update.sh @@ -48,6 +48,10 @@ done # Stop services /etc/init.d/vnstat stop +# Prepare OpenVPN for update +/usr/local/bin/openvpnctrl -k +/usr/local/bin/openvpnctrl -kn2n + # Extract files extract_files @@ -57,6 +61,10 @@ ldconfig # Start services /etc/init.d/vnstat start +# Start OpenVPN again +/usr/local/bin/openvpnctrl -s +/usr/local/bin/openvpnctrl -sn2n + # Update Language cache /usr/local/bin/update-lang-cache