From 739c9efddfe6994f2bcb88f6adccff6e2a601d21 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 15 Sep 2010 20:11:15 +0000 Subject: Send a log entry when openvpn resync is called. --- etc/inc/openvpn.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'etc/inc/openvpn.inc') diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 1fcb77a..a71a9ba 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -688,10 +688,14 @@ function openvpn_resync_all($interface = "") { file_put_contents($path_ovdh, $dh_parameters); } */ + if ($interface <> "") + log_error("Resyncing openvpn instances configurations for interface " . convert_friendly_interface_to_friendly_descr($interface) . "."); + else + log_error("Resyncing openvpn instances configurations."); if (is_array($config['openvpn']['openvpn-server'])) { foreach ($config['openvpn']['openvpn-server'] as & $settings) { - if (!empty($interface) && $interface != $settings['interface']) + if ($interface <> "" && $interface != $settings['interface']) continue; openvpn_resync('server', $settings); } @@ -699,7 +703,7 @@ function openvpn_resync_all($interface = "") { if (is_array($config['openvpn']['openvpn-client'])) { foreach ($config['openvpn']['openvpn-client'] as & $settings) { - if (!empty($interface) && $interface != $settings['interface']) + if ($interface <> "" && $interface != $settings['interface']) continue; openvpn_resync('client', $settings); } -- cgit v1.1