Fixes: #11433
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return ${EXIT_ERROR}
fi
done
+
+ ipsec_strongswan_load_pools
}
ipsec_pool_set_type() {
basename "${pool}"
done
}
+
+# Reload all strongswan pools
+ipsec_strongswan_load_pools() {
+ # Do nothing if strongswan is not running
+ if ! service_is_active "strongswan"; then
+ return ${EXIT_OK}
+ fi
+
+ if ! cmd swanctl --load-pools; then
+ log ERROR "Could not reload strongswan pools"
+ return ${EXIT_ERROR}
+ fi
+}