我正在尝试使用 supervisord 运行我的 lsynd 脚本,以使其始终运行。我已经为我的主管编写了这个 conf
[program:autostart_lsyncd]
command=bash -c "lsyncd /home/sync/lsyncd_script.lua"
autostart=true
autorestart=unexpected
numprocs=1
startsecs = 0
stderr_logfile=/var/log/autostart_sync.err.log
stdout_logfile=/var/log/autostart_sync.out.log
脚本在启动时运行正常,但总是退出
2018-04-09 09:48:49,638 INFO success: autostart_lsyncd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2018-04-09 09:48:49,639 INFO exited: autostart_lsyncd (exit status 0; expected)
我不明白这是否是让 lsynd 脚本保持活力的正确方法。建议?