シンプルな起動スクリプトを実行しようとしていますが、起動していないようですが、エラーは表示されません。それが5975で実行を開始したと言う。しかし、私はps ax | grep test
私は11インスタンスを参照してください。 私はsudo stop test
にしようとしたとき、私はstop: Unknown instance:
アップスタート - 停止:不明なインスタンス:
私の例では、私がここで間違ってやっているかわから裸の骨ではなく、明らかに何かが右ではありません取得します。
/etc/init/test.conf:
description "test script"
start on runlevel [2345]
stop on runlevel [016]
respawn
chdir /var/www/html
exec nohup python test.py > test.out &
test.py:
#!/usr/bin/python
import time
while 1:
print 'hello'
time.sleep(60)
スタート
[email protected]:$ sudo start test
test start/running, process 5975
ps ax | grep test
5967 ? S 0:00 python test.py
5970 ? S 0:00 python test.py
5973 ? S 0:00 python test.py
5976 ? S 0:00 python test.py
5979 ? S 0:00 python test.py
5982 ? S 0:00 python test.py
5985 ? S 0:00 python test.py
5988 ? S 0:00 python test.py
5991 ? S 0:00 python test.py
5994 ? S 0:00 python test.py
5997 ? S 0:00 python test.py
停止
[email protected]:$ sudo stop test
stop: Unknown instance:
ps ax | grep test
5967 ? S 0:00 python test.py
5970 ? S 0:00 python test.py
5973 ? S 0:00 python test.py
5976 ? S 0:00 python test.py
5979 ? S 0:00 python test.py
5982 ? S 0:00 python test.py
5985 ? S 0:00 python test.py
5988 ? S 0:00 python test.py
5991 ? S 0:00 python test.py
5994 ? S 0:00 python test.py
5997 ? S 0:00 python test.py
ありませんが、あなたはすでにこれを試してみました - ランレベルで停止[2345!]? –
はい、私はそれを試しました –