Reputation: 123
I want to implement the logic in chef-recipe like below. How I can achieve this
File=/tmp/productMain.param
if [ -f "${File}" ]; then
if [ -f /tmp/monitor.sh ]; then
echo "[INFO] configuration beeing processed"
/tmp/monitor.sh $File
else
error "The monitor script doe not exit
exit 1
fi
else
error "input file does not exist"
exit 1
fi
Upvotes: 1
Views: 1901
Reputation: 54
Take a look at the Chef documentation, it is very good and gives examples on how use the bash resource: https://docs.chef.io/resource_bash.html
Upvotes: 1