From c876662c7e9afc1efc6f0892379b51ffc7134918 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 30 Jun 2007 21:19:41 +0000 Subject: Remove openvpn csc file when option is disabled. Ticket #1339 --- etc/inc/openvpn.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'etc') 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"; -- cgit v1.1