我正在编写一个上帝脚本来监控我的独角兽。我从 GitHub 的示例脚本开始,一直在修改它以匹配我的服务器配置。一旦上帝运行,诸如god stop unicorn
和之类的命令god restart unicorn
就可以正常工作。
但是,god start unicorn
结果WARN: unicorn start command exited with non-zero code = 1
. 奇怪的是,如果我直接从配置文件中复制启动脚本,它会像全新的野马一样启动。
这是我的启动命令:
/usr/local/bin/unicorn_rails -c /home/my-linux-user/my-rails-app/config/unicorn.rb -E production -D
我已在配置文件中将所有路径声明为绝对路径。有什么想法可能会阻止此脚本工作吗?