diff options
author | doktornotor <notordoktor@gmail.com> | 2015-08-11 13:28:01 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-08-11 13:28:01 +0200 |
commit | d1e94cb5821e6bb5d5e3d05e2e5c47ec81b87730 (patch) | |
tree | 1dfe1b2b16550ec07bf9e96ad591b1d493df5956 /config/sshdcond | |
parent | de0a96f7ddea5013663b390c075cb564fd39e6a1 (diff) | |
download | pfsense-packages-d1e94cb5821e6bb5d5e3d05e2e5c47ec81b87730.tar.gz pfsense-packages-d1e94cb5821e6bb5d5e3d05e2e5c47ec81b87730.tar.bz2 pfsense-packages-d1e94cb5821e6bb5d5e3d05e2e5c47ec81b87730.zip |
sshdcond.inc - fix sshdcond_sync_on_changes() logic take two
Diffstat (limited to 'config/sshdcond')
-rw-r--r-- | config/sshdcond/sshdcond.inc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/config/sshdcond/sshdcond.inc b/config/sshdcond/sshdcond.inc index d68ece7f..12af3551 100644 --- a/config/sshdcond/sshdcond.inc +++ b/config/sshdcond/sshdcond.inc @@ -117,26 +117,26 @@ function sshdcond_custom_php_write_config() { function sshdcond_sync_on_changes() { global $config, $g; + /* Basically, this package was never configured */ if (!is_array($config['installedpackages']['sshdcondsync'])) { - /* Basically, this package was never configured */ return; - } elseif (!$config['installedpackages']['sshdcondsync']['config'][0]['synconchanges']) { - /* Package is configured but XMLRPC sync is disabled */ + } + /* Package is configured but XMLRPC sync is disabled */ + if (!isset($config['installedpackages']['sshdcondsync']['config'][0]['synconchanges'])) { return; - } else { - /* Do XMLRPC sync */ - log_error("[sshdcond] xmlrpc sync is starting."); - foreach ($config['installedpackages']['sshdcondsync']['config'] as $rs) { - foreach($rs['row'] as $sh) { - $sync_to_ip = $sh['ipaddress']; - $password = $sh['password']; - if ($password && $sync_to_ip) { - sshdcond_do_xmlrpc_sync($sync_to_ip, $password); - } + } + /* Do XMLRPC sync */ + log_error("[sshdcond] xmlrpc sync is starting."); + foreach ($config['installedpackages']['sshdcondsync']['config'] as $rs) { + foreach($rs['row'] as $sh) { + $sync_to_ip = $sh['ipaddress']; + $password = $sh['password']; + if ($password && $sync_to_ip) { + sshdcond_do_xmlrpc_sync($sync_to_ip, $password); } } - log_error("[sshdcond] xmlrpc sync is ending."); } + log_error("[sshdcond] xmlrpc sync is ending."); } /* Do the actual XMLRPC sync. */ |