From: Jonatan Schlag Date: Wed, 16 Aug 2017 15:36:55 +0000 (+0200) Subject: ipsec-pool: delete on destroy also the swanctl configuration file X-Git-Tag: 010~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca0527ddafced5ff8b537fe0188cbff0b52114b0;p=network.git ipsec-pool: delete on destroy also the swanctl configuration file Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.ipsec-pool b/src/functions/functions.ipsec-pool index 5decaa40..54bf29e1 100644 --- a/src/functions/functions.ipsec-pool +++ b/src/functions/functions.ipsec-pool @@ -229,6 +229,13 @@ ipsec_pool_destroy() { continue fi + if [ -f "${NETWORK_IPSEC_SWANCTL_POOLS_DIR}/${pool}.conf" ]; then + if ! file_delete "${NETWORK_IPSEC_SWANCTL_POOLS_DIR}/${pool}.conf"; then + # We going on here to delete at least the configuration directory + log ERROR "Could not delete ${NETWORK_IPSEC_SWANCTL_POOLS_DIR}/${pool}.conf" + fi + fi + log DEBUG "Deleting VPN IPsec pool ${pool}" if ! rm -rf "${NETWORK_IPSEC_POOLS_DIR}/${pool}"; then