Skip to content

Commit

Permalink
Allow OnDemand to be toggled later (#1557)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackivanov authored Sep 6, 2019
1 parent 95eddcc commit c6f45ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions roles/strongswan/templates/mobileconfig.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<dict>
<key>IKEv2</key>
<dict>
{% if algo_ondemand_wifi or algo_ondemand_cellular %}
<key>OnDemandEnabled</key>
<integer>1</integer>
<integer>{{ 1 if algo_ondemand_wifi or algo_ondemand_cellular else 0 }}</integer>
<key>OnDemandRules</key>
<array>
{% 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(',') %}
<dict>
Expand Down Expand Up @@ -52,12 +52,12 @@
<key>URLStringProbe</key>
<string>http://captive.apple.com/hotspot-detect.html</string>
</dict>
{% endif %}
<dict>
<key>Action</key>
<string>Disconnect</string>
<string>{{ 'Disconnect' if algo_ondemand_wifi or algo_ondemand_cellular else 'Connect' }}</string>
</dict>
</array>
{% endif %}
<key>AuthenticationMethod</key>
<string>Certificate</string>
<key>ChildSecurityAssociationParameters</key>
Expand Down

0 comments on commit c6f45ea

Please sign in to comment.