Skip to content

Instantly share code, notes, and snippets.

@jooooooon
Created March 3, 2011 15:29
Show Gist options
  • Save jooooooon/852938 to your computer and use it in GitHub Desktop.
Save jooooooon/852938 to your computer and use it in GitHub Desktop.
Cfengine: add line to /etc/crontab
bundle agent cron_ensure_cfexecd_running {
files:
"$(g.crontab)"
edit_line => add_lines;
}
bundle edit_line add_lines
{
insert_lines:
"*/5 * * * * root if [ `ps -efww | grep cf-execd | grep -v grep | wc -l` -eq 0 ]; then /var/cfengine/bin/cf-execd; fi";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment