diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-06-30 21:19:41 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-06-30 21:19:41 +0000 |
commit | c876662c7e9afc1efc6f0892379b51ffc7134918 (patch) | |
tree | 16735050dcec49ffad8fb20ee84c0d3f54bc947a /etc/inc/openvpn.inc | |
parent | 66cc67c6ececa3adfa666afc703a6d998f863220 (diff) | |
download | pfsense-c876662c7e9afc1efc6f0892379b51ffc7134918.zip pfsense-c876662c7e9afc1efc6f0892379b51ffc7134918.tar.gz |
Remove openvpn csc file when option is disabled.
Ticket #1339
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r-- | etc/inc/openvpn.inc | 8 |
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"; |