aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsbin/spark-daemon.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/spark-daemon.sh b/sbin/spark-daemon.sh
index ec6d0b5a40..e1bcc7d642 100755
--- a/sbin/spark-daemon.sh
+++ b/sbin/spark-daemon.sh
@@ -166,7 +166,7 @@ case $option in
if [ -f $pid ]; then
TARGET_ID="$(cat "$pid")"
- if [[ $(ps -p "$TARGET_ID" -o args=) =~ $command ]]; then
+ if [[ $(ps -p "$TARGET_ID" -o comm=) =~ "java" ]]; then
echo "stopping $command"
kill "$TARGET_ID"
else