From c6f45ead6920abec525129ec37b5e7adde45b2fb Mon Sep 17 00:00:00 2001 From: Jack Ivanov <17044561+jackivanov@users.noreply.github.com> Date: Fri, 6 Sep 2019 09:33:36 +0200 Subject: [PATCH] Allow OnDemand to be toggled later (#1557) --- 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