Skip to content

Commit a0051f6

Browse files
loosen the process checking while stopping a service
1 parent ed5f4bb commit a0051f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sbin/spark-daemon.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ case $option in
166166

167167
if [ -f $pid ]; then
168168
TARGET_ID="$(cat "$pid")"
169-
if [[ $(ps -p "$TARGET_ID" -o args=) =~ $command ]]; then
169+
if [[ $(ps -p "$TARGET_ID" -o comm=) =~ "java" ]]; then
170170
echo "stopping $command"
171171
kill "$TARGET_ID"
172172
else

0 commit comments

Comments
 (0)