我有两个暴发户的脚本,我想第二个在第一个之后开始
这是我在第二个(迪尔/秒):
start on (started runlevel [345] and dir/first) stop on (stopped dir/first or runlevel [0126])
这两个脚本都在/ etc / init / dir /目录中。 我用这两个链接作为参考: http : //jurjenbokma.com/ApprenticesNotes/ubuntu_upstart.html和http://upstart.ubuntu.com/cookbook/
– 问题1
当我开始第一个
initctl start dir/first
第二个不启动!
– 问题2
另外,我可以开始第二个
initctl start dir/second
即使第一个停止!
那么为什么这不工作?
我认为你的条件是不正确的。 runlevel []是一个事件,并且started <job name>是一个事件,所以你的条件应该是:
start on runlevel [345] and started dir/first stop on stopped dir/first or runlevel [0126]