Forum: Cfengine Help Subject: silly cfengine trick #! Author: matter Link to topic: https://cfengine.com/forum/read.php?3,19692,19692#msg-19692
Have you ever thought, "Gee, I love the power of cfengine syntax, I just wish I could script it like perl or shell script." Well, what's stopping you. % cat hello.cf #!/var/cfengine/bin/cf-agent -Kf ########################################################################## body common control { bundlesequence => { "hello" }; } ########################################################################## bundle agent hello { reports: cfengine_3:: "Hello, world"; } ########################################################################## % ./hello.cf R: Hello, world Why would you want to do this? Say you have a crontab entry to make sure cf-execd is running. 50 * * * * /var/cfengine/bin/cf-agent -Kf cf_verify.cf > /dev/null 2>&1 # CF3 why not do 50 * * * * /var/cfengine/cf_verify.cf Impress your friends and family, be the life of the party! _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine