首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >rc.local内容在启动时不运行

rc.local内容在启动时不运行
EN

Stack Overflow用户
提问于 2017-02-03 17:39:32
回答 1查看 627关注 0票数 0

我有一个rc.local文件,其中包含以下命令,以便在启动时运行concourse ci

代码语言:javascript
复制
#!/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时,它会运行,我可以关闭会话,它会继续运行。

我哪里错了?

EN

回答 1

Stack Overflow用户

发布于 2017-02-04 05:36:23

检查您的/etc/rc.local文件是否具有+x执行权限。基本上,您可以发出chmod 755 /etc/rc.local。还要执行更新-rc.d rc.local默认设置并重新启动。看看这是否有帮助

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42021131

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档