This is an easy way to forcing a regenration if we do not want to change any setting.
Fixes: #11627
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
+ if ! [ -f "${NETWORK_IPSEC_SWANCTL_CONNECTIONS_DIR}/${connection}.conf" ]; then
+ log DEBUG "Could not find a swanctl config, generating swanctl config"
+ ipsec_connection_to_strongswan "${connection}"
+ ipsec_strongswan_load
+ fi
+
cmd swanctl --initiate --child "${connection}"
}
cmd swanctl --initiate --child "${connection}"
}