首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何从chef-recipe运行bash脚本文件

如何从chef-recipe运行bash脚本文件
EN

Stack Overflow用户
提问于 2016-07-28 17:48:31
回答 1查看 1.6K关注 0票数 1

我想在chef-recipe中实现逻辑,如下所示。我如何实现这一点?

代码语言:javascript
运行
复制
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
EN

回答 1

Stack Overflow用户

发布于 2016-07-28 21:28:12

看看Chef文档,它非常好,并给出了如何使用bash资源的示例:https://docs.chef.io/resource_bash.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38632804

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档