move multiserver message to once during startup only

This commit is contained in:
Andrew Bauer 2016-05-23 20:06:29 -05:00
parent 47db5819db
commit bc163b33fc
2 changed files with 6 additions and 6 deletions

View File

@ -226,7 +226,12 @@ if ( $command =~ /^(?:start|restart)$/ )
zmMemTidy(); zmMemTidy();
runCommand( "zmdc.pl startup" ); runCommand( "zmdc.pl startup" );
Info( "Starting up services" . ( $Config{ZM_SERVER_ID} ? " for server $Config{ZM_SERVER_ID}\n" : "\n" ) ); if ( $Config{ZM_SERVER_ID} ) {
Info( "Multi-server configuration detected. Starting up services for server $Config{ZM_SERVER_ID}\n");
} else {
Info( "Single server configuration detected. Starting up services." );
}
my $sql = $Config{ZM_SERVER_ID} ? 'SELECT * FROM Monitors WHERE ServerId=?' : 'SELECT * FROM Monitors'; my $sql = $Config{ZM_SERVER_ID} ? 'SELECT * FROM Monitors WHERE ServerId=?' : 'SELECT * FROM Monitors';
my $sth = $dbh->prepare_cached( $sql ) my $sth = $dbh->prepare_cached( $sql )
or Fatal( "Can't prepare '$sql': ".$dbh->errstr() ); or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );

View File

@ -135,11 +135,6 @@ void zmLoadConfig()
} }
} }
if ( ! staticConfig.SERVER_ID ) {
Debug( 1, "No Server ID or Name specified in config. Not using Multi-Server Mode." );
} else {
Debug( 1, "Server is %d: using Multi-Server Mode.", staticConfig.SERVER_ID );
}
} }
StaticConfig staticConfig; StaticConfig staticConfig;