]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/rootfiles/core/119/update.sh
IPsec: Try to restart always-on tunnels immediately
[ipfire-2.x.git] / config / rootfiles / core / 119 / update.sh
index e4c7a77ebe9dfeffe4b9fd96bd012ff5199b348a..1231a4941bb35e36b37bd184ebfc93f33e9f73c0 100644 (file)
@@ -73,8 +73,14 @@ rm -vf \
 
 # Start services
 
-# This update need a reboot...
-#touch /var/run/need_reboot
+# Regenerate IPsec configuration
+sudo -u nobody /srv/web/ipfire/cgi-bin/vpnmain.cgi
+if grep -q "ENABLED=on" /var/ipfire/vpn/settings; then
+       /etc/init.d/ipsec restart
+fi
+
+# This update needs a reboot...
+touch /var/run/need_reboot
 
 # Finish
 /etc/init.d/fireinfo start