From de85521ad54e27c2d0c8212c8ef907a3ac6be76d Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 14 Aug 2013 08:48:46 -0400 Subject: Remove prior CSC entry when cleaning up. Fixes #3143 --- etc/inc/openvpn.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'etc/inc/openvpn.inc') diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 2014d1c..6dbf27a 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -838,6 +838,16 @@ function openvpn_delete($mode, & $settings) { mwexec("/bin/rm {$g['varetc_path']}/openvpn/{$mode_id}.*"); } +function openvpn_cleanup_csc($common_name) { + global $g, $config; + if (empty($common_name)) + return; + $fpath = "{$g['varetc_path']}/openvpn-csc/" . basename($common_name); + if (is_file($fpath)) + unlink_if_exists($fpath); + return; +} + function openvpn_resync_csc(& $settings) { global $g, $config; -- cgit v1.1