-show which process id is being shutdown when calling airtime-xxx-stop

This commit is contained in:
martin 2011-05-17 11:55:16 -04:00
parent 91caaf2c0f
commit 35e617911b
3 changed files with 7 additions and 3 deletions

View file

@ -10,7 +10,7 @@ if os.geteuid() != 0:
sys.exit(1)
try:
print "Stopping daemontool script recorder...",
print "Stopping daemontool script recorder..."
p1 = subprocess.Popen(["ps", "aux"], stdout=subprocess.PIPE)
p2 = subprocess.Popen(["awk", "/recorder.py/ && !/awk/ {print $2}"], stdin=p1.stdout, stdout=subprocess.PIPE)
@ -22,6 +22,7 @@ try:
pids = recorder_pid.split("\n")
for pid in pids:
os.system("kill -2 %s" % pid)
print "Shutting down process id %s" % pid
print "Success."
else:
print "Not Running."