]> git.ipfire.org Git - people/mlorenz/ipfire-2.x.git/commitdiff
Core Update 179: Only start services if they are enabled
authorPeter Müller <peter.mueller@ipfire.org>
Wed, 23 Aug 2023 14:43:00 +0000 (14:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Aug 2023 10:10:40 +0000 (10:10 +0000)
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 <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/179/update.sh

index 636792d82066a324a1170d90146e8a2466311610..df89d702ec29250460362890814df15751009740 100644 (file)
@@ -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