Browse Source

Fixed issue in stop() to find appropriate process.

Todd Fredrich 12 years ago
parent
commit
dd2401c209
1 changed files with 2 additions and 1 deletions
  1. 2 1
      restexpress/setup.py

+ 2 - 1
restexpress/setup.py

@@ -2,6 +2,7 @@
 import subprocess
 import sys
 import setup_util
+import os
 
 def start(args):
   setup_util.replace_text("restexpress/config/dev/environment.properties", "mongodb:\/\/.*\/hello_world", "mongodb://" + args.database_host + "/hello_world")
@@ -19,7 +20,7 @@ def stop():
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   for line in out.splitlines():
-    if 'hello.Main' in line:
+    if 'world-1.0-SNAPSHOT.jar' in line:
       pid = int(line.split(None, 2)[1])
       os.kill(pid, 9)
   return 0