mirror of
https://github.com/correl/rebar.git
synced 2024-11-15 03:00:18 +00:00
Fix portability of ps invocation
This commit is contained in:
parent
0bb429c197
commit
2ff81e5058
1 changed files with 17 additions and 1 deletions
|
@ -66,7 +66,23 @@ case "$1" in
|
|||
|
||||
stop)
|
||||
# Wait for the node to completely stop...
|
||||
PID=`ps -ef|grep "$RUNNER_BASE_DIR/.*/[b]eam.smp|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.smp"|awk '{print $1}'`
|
||||
;;
|
||||
SunOS)
|
||||
# PID COMMAND
|
||||
PID=`ps -ef -o pid -o args|\
|
||||
grep "$RUNNER_BASE_DIR/.*/[b]eam.smp"|awk '{print $1}'`
|
||||
;;
|
||||
CYGWIN*)
|
||||
# UID PID PPID TTY STIME COMMAND
|
||||
PID=`ps -efW|grep "$RUNNER_BASE_DIR/.*/[b]eam.smp"|\
|
||||
awk '{print $2}'`
|
||||
;;
|
||||
esac
|
||||
$NODETOOL stop
|
||||
while `kill -0 $PID 2>/dev/null`;
|
||||
do
|
||||
|
|
Loading…
Reference in a new issue