Stop all services when pt-agent stops due to signal.

This commit is contained in:
Daniel Nichter
2013-06-14 17:26:58 -07:00
parent 3799682bce
commit ad3e6a1663

View File

@@ -6028,6 +6028,10 @@ sub run_agent {
);
}
stop_all_services(
lib_dir => $lib_dir,
);
# This shouldn't happen until the service is stopped/killed.
$logger->info('Agent ' . $agent->name . ' has stopped');
return;
@@ -7746,7 +7750,7 @@ sub stop_all_services {
);
};
if ( $EVAL_ERROR ) {
$logger->warning("Error removing services from crontab: $EVAL_ERROR");
$logger->error("Error removing services from crontab: $EVAL_ERROR");
}
# Stop all real services by running their stop-<service> meta-service.