summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-06-30 21:19:41 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-06-30 21:19:41 +0000
commitc876662c7e9afc1efc6f0892379b51ffc7134918 (patch)
tree16735050dcec49ffad8fb20ee84c0d3f54bc947a /etc
parent66cc67c6ececa3adfa666afc703a6d998f863220 (diff)
downloadpfsense-c876662c7e9afc1efc6f0892379b51ffc7134918.zip
pfsense-c876662c7e9afc1efc6f0892379b51ffc7134918.tar.gz
Remove openvpn csc file when option is disabled. Ticket #1339
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/openvpn.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 457f492..47f221b 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -468,8 +468,12 @@ function openvpn_resync_csc($id) {
$settings = $config['installedpackages']['openvpncsc']['config'][$id];
- if ($settings['disable'] == 'on') return;
-
+ if ($settings['disable'] == 'on') {
+ $filename = "{$g['varetc_path']}/openvpn_csc/{$settings['commonname']}";
+ unlink_if_exists($filename);
+ return;
+ }
+
$conf = '';
if ($settings['block'] == 'on') $conf .= "disable\n";
if ($settings['push_reset'] == 'on') $conf .= "push-reset\n";
OpenPOWER on IntegriCloud