Add some debug to logrot

This commit is contained in:
Isaac Connor 2019-11-21 10:49:23 -05:00
parent 1c51c695d9
commit f1ec455665
1 changed files with 4 additions and 0 deletions

View File

@ -166,6 +166,7 @@ if ( !$server_up ) {
# Server is not up. Some commands can still be handled
if ( $command eq 'logrot' ) {
# If server is not running, then logrotate doesn't need to do anything.
Debug("Server is not running, logrotate doesn't need to do anything");
exit();
}
if ( $command eq 'check' ) {
@ -631,8 +632,11 @@ sub logrot {
logReinit();
foreach my $process ( values %pid_hash ) {
if ( $process->{pid} ) {
Debug("Hupping $$process{command} at $$process{pid}");
# && $process->{command} =~ /^zm.*\.pl/ ) {
kill('HUP', $process->{pid});
} else {
Debug("Not Hupping $$process{command}");
}
}
}