Update/fix pt-agent to work with new Service.run_schedule and Service.spool_schedule attribs.

This commit is contained in:
Daniel Nichter
2013-01-30 13:25:21 -07:00
parent 57722889cb
commit bf92ce765d
9 changed files with 41 additions and 22 deletions

View File

@@ -4951,8 +4951,9 @@ sub make_new_crontab {
: `crontab -l 2>/dev/null`;
my @other_lines
= grep { $_ !~ m/pt-agent --run-service/ }
= grep { $_ !~ m/pt-agent (?:--run-service|--send-data)/ }
split("\n", $crontab_list);
PTDEBUG && _d('Other crontab lines:', \@other_lines);
my @pt_agent_lines;
foreach my $service ( @$services ) {
@@ -4968,6 +4969,7 @@ sub make_new_crontab {
. $service->name;
}
}
PTDEBUG && _d('pt-agent crontab lines:', \@pt_agent_lines);
my $new_crontab = join("\n", @other_lines, @pt_agent_lines) . "\n";