我的工作很正常:
> start c4-ha-policy ; stop c4-ha-policy
c4-ha-policy (start) waiting
c4-ha-policy (start) starting
c4-ha-policy (start) pre-start, process 1731
c4-ha-policy (start) spawned, process 1828
c4-ha-policy (start) post-start, process 1829
main process 1828
c4-ha-policy (start) running, process 1828
c4-ha-policy (stop) running, process 1828
c4-ha-policy (stop) pre-stop, process 1956
main process 1828
c4-ha-policy (stop) stopping, process 1828
c4-ha-policy (stop) killed, process 1828
c4-ha-policy (stop) post-stop, process 2023
c4-ha-policy (stop) waiting
现在,如果我复制它并启动它,它会失败:
> mv c4-ha-policy test1
> start test1
start: Unknown job: test1
如果我将其移回,它就会正常工作。就好像 init 没有重新读取目录一样。我该怎么做?
initctl --version
initctl (upstart 0.3.8)
Copyright (C) 2007 Canonical Ltd.
谢谢!
答案1
所有职位必须以 ' ' 结尾.conf
。看到了吧init(5)
。你确定 c4-ha-policy 实际上不是 吗/etc/init/c4-ha-policy.conf
?