我想在chef-recipe中实现逻辑,如下所示。我如何实现这一点?
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
发布于 2016-07-28 21:28:12
看看Chef文档,它非常好,并给出了如何使用bash资源的示例:https://docs.chef.io/resource_bash.html
https://stackoverflow.com/questions/38632804
复制相似问题