作业控制/后台进程(使用&符号).ebextensionsconfiguration命令

以例如下面的.config文件.ebextensions /

container_commands: 000_run_queue_daemon: command: "nohup php artisan queue:work --daemon &" test: "ps -ef | grep artisan | grep -v grep > /dev/null || echo 1" 

如果守护程序尚未运行,请启动队列工作程序。 队列工作守护程序永远运行(按devise),因此需要作为后台进程运行。

&符号似乎没有任何作用,并且尾随cfn-init.log只是暂停

 2014-09-15 00:24:53,921 [DEBUG] Running test for command 000_run_queue_daemon 2014-09-15 00:24:53,929 [DEBUG] Test command output: 1 2014-09-15 00:24:53,929 [DEBUG] Test for command 000_run_queue_daemon passed 

然后保持这种状态直到EBstream程超时,并放弃部署。

我怎样才能使这个运行作为后台进程?

为了使这个工作,我不得不使用后部署挂钩从文件运行命令

 commands: create_post_dir: command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post" ignoreErrors: true files: "/opt/elasticbeanstalk/hooks/appdeploy/post/99_restart_workers.sh": mode: "000755" owner: root group: root content: | #!/usr/bin/env bash nohup php /var/app/current/artisan queue:work --daemon >/dev/null 2>&1 &