From 1590316bdb8f02a51947e6ad710189f7615f9a19 Mon Sep 17 00:00:00 2001 From: Jack Ivanov Date: Wed, 21 Aug 2019 10:13:50 +0200 Subject: [PATCH] Allow OnDemand to be toggled later --- roles/strongswan/templates/mobileconfig.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/strongswan/templates/mobileconfig.j2 b/roles/strongswan/templates/mobileconfig.j2 index a8123d5..807683f 100644 --- a/roles/strongswan/templates/mobileconfig.j2 +++ b/roles/strongswan/templates/mobileconfig.j2 @@ -8,11 +8,11 @@ IKEv2 -{% if algo_ondemand_wifi or algo_ondemand_cellular %} OnDemandEnabled - 1 + {{ 1 if algo_ondemand_wifi or algo_ondemand_cellular else 0 }} OnDemandRules +{% if algo_ondemand_wifi or algo_ondemand_cellular %} {% if algo_ondemand_wifi_exclude|b64decode != '_null' %} {% set WIFI_EXCLUDE_LIST = (algo_ondemand_wifi_exclude|b64decode|string).split(',') %} @@ -52,12 +52,12 @@ URLStringProbe http://captive.apple.com/hotspot-detect.html +{% endif %} Action - Disconnect + {{ 'Disconnect' if algo_ondemand_wifi or algo_ondemand_cellular else 'Connect' }} -{% endif %} AuthenticationMethod Certificate ChildSecurityAssociationParameters