我有一个rc.local文件,其中包含以下命令,以便在启动时运行concourse ci
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sudo ./concourse web --basic-auth-username myuser --basic-auth-password
mypass --session-signing-key session_signing_key --tsa-host-key tsa_host_key
--tsa-authorized-keys authorized_worker_keys --external-url http://127.0.0.1
--postgres-data-source postgres://ubuntu:ubuntu@localhost/atc &>
/home/ubuntu/concourse-web.log&
sudo ./concourse worker --work-dir /opt/concourse/worker --tsa-host
127.0.0.1 --tsa-public-key tsa_host_key.pub --tsa-worker-private-key
worker_key &> /home/ubuntu/concourse-worker.log&当机器启动时,大厅没有运行。
当我执行/etc/rc.local手动执行rc.local时,它会运行,我可以关闭会话,它会继续运行。
我哪里错了?
发布于 2017-02-04 05:36:23
检查您的/etc/rc.local文件是否具有+x执行权限。基本上,您可以发出chmod 755 /etc/rc.local。还要执行更新-rc.d rc.local默认设置并重新启动。看看这是否有帮助
https://stackoverflow.com/questions/42021131
复制相似问题