带蚊子的永远工具mqtt

问题描述 投票:0回答:1

我正在尝试使用forever start -l mqtt.log --append -c -sh /root/mqtt-sh.sh使用永远的工具使我的mosquitto mqtt代理在我的云实例上持续运行,并且我已经通过将此#!/bin/sh /usr/sbin/mosquitto -c /etc/mosquitto/conf.d/broker.conf添加到mqtt-sh.sh conf文件中来创建了shell脚本。但这是我得到的输出:

help:    usage: forever [action] [options] SCRIPT [script-options]
help:
help:    Monitors the script specified in the current process or as a daemon
help:
help:    actions:
help:      start               Start SCRIPT as a daemon
help:      stop                Stop the daemon SCRIPT by Id|Uid|Pid|Index|Script
help:      stopall             Stop all running forever scripts
help:      restart             Restart the daemon SCRIPT
help:      restartall          Restart all running forever scripts
help:      list                List all running forever scripts
help:      config              Lists all forever user configuration
help:      set <key> <val>     Sets the specified forever config <key>

我也在forever list中检查了该过程,但不存在

shell ubuntu mosquitto forever
1个回答
0
投票

[Forever用于运行NodeJS脚本文件,而不是Shell脚本。

而且mosquitto也不需要它,它将作为systemd服务安装,可以将其设置为在启动时启动,并且将一直运行到计算机关闭为止。

© www.soinside.com 2019 - 2024. All rights reserved.