如何创建 monitrc 配置文件

发布于 2024-11-14 14:20:04 字数 451 浏览 3 评论 0原文

下面是我的delayed_job monitrc 文件,我想将其用作erb 模板,以便我可以动态设置RAILS_ENV 变量。有谁知道该怎么做?

set daemon  120

check process delayed_job with pidfile /home/rails/public_html/myapp/shared/pids/delayed_job.pid
  start program = "/usr/bin/env RAILS_ENV=production /home/rails/public_html/myapp/current/script/delayed_job start"
  stop program = "/usr/bin/env RAILS_ENV=production /home/rails/public_html/myapp/current/script/delayed_job stop"

Below is my delayed_job monitrc file, i wanted to use it as an erb template so that i can dynamically set the RAILS_ENV variable. Does anyone know how to do it?

set daemon  120

check process delayed_job with pidfile /home/rails/public_html/myapp/shared/pids/delayed_job.pid
  start program = "/usr/bin/env RAILS_ENV=production /home/rails/public_html/myapp/current/script/delayed_job start"
  stop program = "/usr/bin/env RAILS_ENV=production /home/rails/public_html/myapp/current/script/delayed_job stop"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

短暂陪伴 2024-11-21 14:20:04

怎么样?

set daemon <%= interval %>
check process <%= process_name %> with pidfile <%= pidfile %>
  start program = "<%= start_program %>"
  stop program = "<%= stop_program %>"

相应地设置这些变量

How about

set daemon <%= interval %>
check process <%= process_name %> with pidfile <%= pidfile %>
  start program = "<%= start_program %>"
  stop program = "<%= stop_program %>"

with these variables set accordingly?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文