How to replace the init.d chef-client service with a cron

To disable chef-client from init.d (be sure you really want to do this!)

chkconfig|grep chef # this should say it's 'on' before proceeding
update-rc.d chef-client remove
chkconfig|grep chef # this should say it's 'off' now that you disabled it.

Then add something like this to your crontab:

0 */4 * * * /bin/sleep 31;  /usr/bin/chef-client &> /dev/null
VN:F [1.9.22_1171]
Rating: 5.0/5 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)
How to replace the init.d chef-client service with a cron, 5.0 out of 5 based on 2 ratings
Facebook Twitter Email

Leave a Reply