mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-22 11:54:54 +00:00
Check for crontab during --install.
This commit is contained in:
11
bin/pt-agent
11
bin/pt-agent
@@ -8146,6 +8146,7 @@ sub install {
|
||||
my @steps = (
|
||||
"Verify the user is root",
|
||||
"Check Perl module dependencies",
|
||||
"Check for crontab",
|
||||
"Verify the API key",
|
||||
"Connect to MySQL",
|
||||
"Check if MySQL is a slave",
|
||||
@@ -8200,6 +8201,14 @@ sub install {
|
||||
$next_step->();
|
||||
exit 1 if check_deps();
|
||||
|
||||
# Check for crontab
|
||||
$next_step->();
|
||||
my $crontab = `which crontab 2>/dev/null`;
|
||||
if ( !$crontab ) {
|
||||
die "cron is not installed, or crontab is not in your PATH.\n";
|
||||
}
|
||||
$next_step->();
|
||||
|
||||
# Must have a valid API key.
|
||||
my $api_key = $o->get('api-key');
|
||||
my $client;
|
||||
@@ -9127,6 +9136,8 @@ pt-agent requires:
|
||||
|
||||
=item * Standard Linux bin tools (grep, awk, stat, etc.)
|
||||
|
||||
=item * cron
|
||||
|
||||
=item * A Bash shell
|
||||
|
||||
=item * Core Perl modules
|
||||
|
Reference in New Issue
Block a user