Remove warnings when no server set
This commit is contained in:
parent
fdf7a860db
commit
54bff42fa0
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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() );
|
||||||
|
|
Loading…
Reference in New Issue