Merge pull request #1499 from knnniggett/mserver_msg

move multiserver message to display once during startup only
This commit is contained in:
Isaac Connor 2016-05-24 11:08:11 -04:00
commit 0522b03364
2 changed files with 11 additions and 7 deletions

View File

@ -226,7 +226,12 @@ if ( $command =~ /^(?:start|restart)$/ )
zmMemTidy();
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 $sth = $dbh->prepare_cached( $sql )
or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );

View File

@ -133,12 +133,11 @@ void zmLoadConfig()
} else {
Fatal("Can't get ServerName for Server ID %d", staticConfig.SERVER_ID );
}
}
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 );
if ( staticConfig.SERVER_ID ) {
Debug( 3, "Multi-server configuration detected. Server is %d.", staticConfig.SERVER_ID );
} else {
Debug( 3, "Single server configuration assumed because no Server ID or Name was specified." );
}
}
}