加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

如何在FreeBSD中自动启动supervisor?

发布时间:2020-12-13 17:10:58 所属栏目:Linux 来源:网络整理
导读:在FreeBSD上是否存在 supervisord 的预先存在的启动脚本?如果没有,是否有一个很好的指南为FreeBSD编写rc.d脚本?我对这个平台很陌生. 谢谢. 更新: 我现在在/usr/local/etc/rc.d/supervisord中有以下内容,但它似乎没有工作.我没有在与supervisord相关的启动
在FreeBSD上是否存在 supervisord的预先存在的启动脚本?如果没有,是否有一个很好的指南为FreeBSD编写rc.d脚本?我对这个平台很陌生.

谢谢.

更新:

我现在在/usr/local/etc/rc.d/supervisord中有以下内容,但它似乎没有工作.我没有在与supervisord相关的启动滚动中看到任何内容.

#!/bin/sh

# PROVIDE: supervisord
# REQUIRE: LOGIN
# KEYWORD: shutdown

. /etc/rc.subr

name="supervisord"
rcvar=`set_rcvar`
load_rc_config "$name"

command="/usr/local/bin/${name}"
command_args="-c /usr/local/etc/supervisord.conf"

supervisord_enable=${supervisord_enable-"NO"}
supervisord_pidfile=${supervisord_pidfile-"/var/run/supervisord.pid"}

pidfile="${supervisord_pidfile}"

run_rc_command "$1"

解决方法

如果您从ports(sysutils / py-supervisor)安装了supervisord,那么在/usr/local/etc/rc.d/supervisord中应该有一个正常运行的rc脚本

检查脚本中的info /其他配置参数,但只需在/etc/rc.conf中添加supervisord_enable =“YES”就可以使其在启动时自动启动.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读