从厨师食谱中运行.sh

时间:2015-01-05 22:17:58

标签: chef chef-recipe chef-solo

我正在尝试从食谱中运行.sh脚本。它说厨师客户完成了。运行处理程序完成。但是.sh脚本没有运行。配方如下。有什么问题?

execute "run script" do 
    command "sh /scratch/chef/installm.sh compact /scratch/chef" 
end

2 个答案:

答案 0 :(得分:1)

我能够使用-l debug选项运行。 .sh脚本抛出错误,说JAVA_HOME没有设置。感谢。

答案 1 :(得分:0)

installm.sh脚本是否已经存在于您尝试运行该cookbook的客户端节点上?否则尝试使用source复制脚本。

cookbook_file "/scratch/chef/installm.sh" do
  source "installm.sh"
  mode 0755
 end
  

将install.sh保留在cookbook路径cookbook_name / files / default

相关问题