【发布时间】:2015-09-02 22:10:35
【问题描述】:
我有一个简单的 cloudformation 脚本,我试图在启动时将 ruby 脚本作为后台进程运行。
脚本的相关部分是
"AWS::CloudFormation::Init" : {
"config" : {
"sources" : {
"/etc/scripts" : "http://bootstrap-artifacts.s3.amazonaws.com/scripts.zip"
},
"commands" : {
"1" : {
"command" : "cd /etc/scripts/agent"
},
"2-start" : {
"command" : "nohup ruby agent.rb &"
}
}
}
}
只是为了确认 zip 文件已下载并且脚本存在于正确的目录中。我的 AMI 还为所有用户安装了 ruby 2.0.0。
我不断在 \var\log\cfn-init.log 文件中获取nohup: failed to run command 'ruby': No such file or directory
感谢您的帮助!
【问题讨论】:
标签: ruby bootstrapping amazon-cloudformation