Remove warnings when no server set

This commit is contained in:
Isaac Connor 2016-01-01 21:27:30 -05:00
parent fdf7a860db
commit 54bff42fa0
2 changed files with 2 additions and 1 deletions

View File

@ -114,6 +114,7 @@ BEGIN
my $result = $sth->fetchrow_hashref(); my $result = $sth->fetchrow_hashref();
$Config{ZM_SERVER_ID} = $$result{Id}; $Config{ZM_SERVER_ID} = $$result{Id};
} }
$Config{ZM_SERVER_ID} = undef;
} }
} }

View File

@ -226,7 +226,7 @@ if ( $command =~ /^(?:start|restart)$/ )
zmMemTidy(); zmMemTidy();
runCommand( "zmdc.pl startup" ); runCommand( "zmdc.pl startup" );
Info( "Starting up services for server $Config{ZM_SERVER_ID}\n" ); Info( "Starting up services" . ( $Config{ZM_SERVER_ID} ? " for server $Config{ZM_SERVER_ID}\n" : "\n" ) );
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() );