diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-11-27 00:20:27 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-11-27 00:20:27 +0000 |
commit | 555e30f7d9c93a5d18071c4191689ddfa140e6e7 (patch) | |
tree | de64c8d24d9cb7e75cd88d9ca2354ef6f7942c31 /etc/inc | |
parent | f64bae3dfaee5cb3d89f4a3a7e42786272ffd1db (diff) | |
download | pfsense-555e30f7d9c93a5d18071c4191689ddfa140e6e7.zip pfsense-555e30f7d9c93a5d18071c4191689ddfa140e6e7.tar.gz |
Only pause 5 seconds if we actually started openvpn
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/openvpn.inc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 417d108..7cdbc87 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -471,10 +471,13 @@ function openvpn_create_cscdir() { function openvpn_resync_all() { global $config; + $started = false; + foreach (array('server', 'client') as $mode) { if (is_array($config['installedpackages']["openvpn$mode"]['config'])) { foreach ($config['installedpackages']["openvpn$mode"]['config'] as $id => $settings) openvpn_resync($mode, $id); + $started = true; } } @@ -482,13 +485,15 @@ function openvpn_resync_all() { if (is_array($config['installedpackages']['openvpncsc']['config'])) { foreach ($config['installedpackages']['openvpncsc']['config'] as $id => $csc) openvpn_resync_csc($id); + $started = true; } /* give speedy machines time to settle */ - sleep(5); - - /* reload the filter policy */ - filter_configure(); + if($started) { + sleep(5); + /* reload the filter policy */ + filter_configure(); + } } |