From fb7869feb2c9b8665c2f9e77c2d6e2f0ff9ad832 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCller?= Date: Wed, 23 Aug 2023 14:43:00 +0000 Subject: [PATCH] Core Update 179: Only start services if they are enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Doing so avoids situations where a service is started without being configured to do so, thus reducing the potential for confusion and exposure of services not intended to be exposed by the user. Signed-off-by: Peter Müller Signed-off-by: Michael Tremer --- config/rootfiles/core/179/update.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config/rootfiles/core/179/update.sh b/config/rootfiles/core/179/update.sh index 636792d820..df89d702ec 100644 --- a/config/rootfiles/core/179/update.sh +++ b/config/rootfiles/core/179/update.sh @@ -86,9 +86,13 @@ migrate_extrahd # Start services /etc/init.d/udev restart -/etc/init.d/squid restart -/usr/local/bin/openvpnctrl -s -/usr/local/bin/openvpnctrl -sn2n +if [ -f /var/ipfire/proxy/enable ]; then + /etc/init.d/squid restart +fi +if grep -q "ENABLED=on" /var/ipfire/ovpn/settings; then + /usr/local/bin/openvpnctrl -s + /usr/local/bin/openvpnctrl -sn2n +fi # This update needs a reboot... touch /var/run/need_reboot -- 2.39.5