【发布时间】:2017-08-21 22:21:18
【问题描述】:
以下是我的supervisor.conf。
[supervisord]
nodaemon=true
[program:daphne]
command=source "/opt/ros/indigo/setup.sh" && daphne -b 0.0.0.0 -p 8000 robot_configuration_interface.asgi:channel_layer
[program:worker]
environment=DJANGO_SETTINGS_MODULE="robot_configuration_interface.settings"
command= source "/opt/ros/indigo/setup.bash" && django-admin runworker
这是我得到的错误:
INFO spawnerr:找不到命令“源”
bash 不应该有命令源吗?如果这是使用 sh 我如何强制它运行 bash?
【问题讨论】:
-
.是符合 POSIX 标准的source的同义词。 -
也就是说,supervisord 在这里根本没有调用 shell。如果这是正确的,并且它是直接执行命令,那么您只是不能在顶层使用 shell 习惯用法和命令。
-
明确地说,supervisor 使用the Python
shlexmodule 来执行类似shell 的解析。阅读文档和/或源代码应该可以很好地了解它可以做什么和不能做什么。
标签: bash supervisord