Update of /cvsroot/netpass/NetPass/www/htdocs/Admin/Scan
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3124/www/htdocs/Admin/Scan
Modified Files:
index.mhtml
Log Message:
appstarter changes
Index: index.mhtml
===================================================================
RCS file: /cvsroot/netpass/NetPass/www/htdocs/Admin/Scan/index.mhtml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- index.mhtml 16 Aug 2005 14:04:34 -0000 1.7
+++ index.mhtml 22 Aug 2005 19:26:08 -0000 1.8
@@ -120,10 +120,32 @@
if ($update) {
if ($readOnly eq "") {
+ my %hosts = ( &hostname => 1 );
+ my $allnw = $np->cfg->getNetworks();
+ if (ref($allnw) eq "ARRAY") {
+ foreach my $nw (@$allnw) {
+ if ( $np->cfg->ha($nw) ) {
+ my $svrs = $np->cfg->ha_servers($nw);
+ if (ref($svrs) eq "ARRAY") {
+ foreach my $sn (@$svrs) {
+ $hosts{$sn} = 1;
+ }
+ }
+ }
+ }
+ } else {
+ _log ("ERROR", "getNetworks returns no networks\n");
+ print $q->p({-class=>'error'}, "No networks are configured? I can't reload the plugins.");
+ }
+
if ($service eq "Nessus") {
- $np->db->reqAppAction('reload_nessus_plugins', 'start', '');
+ foreach my $hn (keys %hosts) {
+ $np->db->reqAppAction('reload_nessus_plugins', 'start', 'root', $hn);
+ }
} else {
- $np->db->reqAppAction('reload_snort_plugins', 'start', '');
+ foreach my $hn (keys %hosts) {
+ $np->db->reqAppAction('reload_snort_plugins', 'start', 'root', $hn);
+ }
}
} else {
# this really shouldnt happen. we dont give them a Refresh Plugins button
|