diff options
Diffstat (limited to 'priv/templates/simplenode.runner')
-rwxr-xr-x | priv/templates/simplenode.runner | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/priv/templates/simplenode.runner b/priv/templates/simplenode.runner index 46141bb..cfde552 100755 --- a/priv/templates/simplenode.runner +++ b/priv/templates/simplenode.runner @@ -66,7 +66,22 @@ case "$1" in stop) # Wait for the node to completely stop... - PID=`ps -ef|grep "$RUNNER_BASE_DIR/.*/[b]eam"|awk '{print $2}'` + case `uname -s` in + Linux|Darwin|FreeBSD|DragonFly|NetBSD|OpenBSD) + # PID COMMAND + PID=`ps ax -o pid= -o command=|\ + grep "$RUNNER_BASE_DIR/.*/[b]eam"|cut -d' ' -f1` + ;; + SunOS) + # PID COMMAND + PID=`ps -ef -o pid= -o args=|\ + grep "$RUNNER_BASE_DIR/.*/[b]eam"|cut -d' ' -f1` + ;; + CYGWIN*) + # UID PID PPID TTY STIME COMMAND + PID=`ps -efW|grep "$RUNNER_BASE_DIR/.*/[b]eam"|cut -d' ' -f2` + ;; + esac $NODETOOL stop while `kill -0 $PID 2>/dev/null`; do |