Merge pull request #1499 from knnniggett/mserver_msg
move multiserver message to display once during startup only
This commit is contained in:
commit
0522b03364
|
@ -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() );
|
||||||
|
|
|
@ -133,12 +133,11 @@ void zmLoadConfig()
|
||||||
} else {
|
} else {
|
||||||
Fatal("Can't get ServerName for Server ID %d", staticConfig.SERVER_ID );
|
Fatal("Can't get ServerName for Server ID %d", staticConfig.SERVER_ID );
|
||||||
}
|
}
|
||||||
|
if ( staticConfig.SERVER_ID ) {
|
||||||
}
|
Debug( 3, "Multi-server configuration detected. Server is %d.", staticConfig.SERVER_ID );
|
||||||
if ( ! staticConfig.SERVER_ID ) {
|
|
||||||
Debug( 1, "No Server ID or Name specified in config. Not using Multi-Server Mode." );
|
|
||||||
} else {
|
} else {
|
||||||
Debug( 1, "Server is %d: using Multi-Server Mode.", staticConfig.SERVER_ID );
|
Debug( 3, "Single server configuration assumed because no Server ID or Name was specified." );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue