From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 1/2] ipsec-pool: delete on destroy also the swanctl configuration file Date: Wed, 16 Aug 2017 17:36:55 +0200 Message-ID: <1502897816-14789-1-git-send-email-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8546049800243551997==" List-Id: --===============8546049800243551997== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Jonatan Schlag --- src/functions/functions.ipsec-pool | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/functions/functions.ipsec-pool b/src/functions/functions.ips= ec-pool index fb7e7da..86ba81d 100644 --- a/src/functions/functions.ipsec-pool +++ b/src/functions/functions.ipsec-pool @@ -229,6 +229,13 @@ ipsec_pool_destroy() { continue fi =20 + 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}.c= onf" + fi + fi + log DEBUG "Deleting VPN IPsec pool ${pool}" =20 if ! rm -rf "${NETWORK_IPSEC_POOLS_DIR}/${pool}"; then --=20 2.6.3 --===============8546049800243551997==--