Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 与supervisord一起执行子命令_Linux_Supervisord - Fatal编程技术网

Linux 与supervisord一起执行子命令

Linux 与supervisord一起执行子命令,linux,supervisord,Linux,Supervisord,我想以ip地址作为参数运行服务器 ./server-no-ssl 80 "$(curl http://169.254.169.254/latest/meta-data/public-hostname)" 我正在使用配置的supervisor [program:allsparkrt] command=/home/ubuntu/server-no-ssl 80 "$(curl http://169.254.169.254/latest/meta-data/public-hostname)" dir

我想以ip地址作为参数运行服务器

./server-no-ssl 80 "$(curl http://169.254.169.254/latest/meta-data/public-hostname)"
我正在使用配置的supervisor

[program:allsparkrt]
command=/home/ubuntu/server-no-ssl 80 "$(curl http://169.254.169.254/latest/meta-data/public-hostname)"
directory=/home/ubuntu/
autostart=true
autorestart=true
startretries=3
stderr_logfile=/var/log/allspark_server.err.log
stdout_logfile=/var/log/allspark_server.out.log
stopsignal=INT
stopwaitsecs=60
curl命令作为参数,而不是curl的ip地址。
感谢您的帮助。

Supervisord不会为指定的命令执行shell,因此curl不会被视为命令,而只被视为字符串。查看此项了解更多详细信息。作为一种解决方法,您可以尝试使用
bash-c“所需命令”
construction