Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/functions/functions.ipsec | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/src/functions/functions.ipsec b/src/functions/functions.ipsec index ed889a6..a174a7f 100644 --- a/src/functions/functions.ipsec +++ b/src/functions/functions.ipsec @@ -729,3 +729,12 @@ ipsec_connection_destroy() { fi done } + +# List all ipsec connections +ipsec_list_connections() { + local connection + for connection in ${NETWORK_IPSEC_CONNS_DIR}/*; do + [ -d ${connection} ] || continue + basename ${connection} + done +}