Check for crontab during --install.

This commit is contained in:
Daniel Nichter
2013-06-15 19:06:42 -07:00
parent a01af7e331
commit c35e38ab3b

View File

@@ -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