diff --git a/bin/pt-agent b/bin/pt-agent index 3c926fee..bbaed7fc 100755 --- a/bin/pt-agent +++ b/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