Linux 与supervisord一起执行子命令
我想以ip地址作为参数运行服务器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
./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