Skip to content

Commit

Permalink
remove redundant condition
Browse files Browse the repository at this point in the history
  • Loading branch information
WangTaoTheTonic committed Dec 12, 2014
1 parent f36cfb4 commit cf4ecc6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sbin/spark-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,9 @@ case $option in

if [ -f $pid ]; then
TARGET_ID=`cat $pid`
if kill -0 $TARGET_ID > /dev/null 2>&1; then
if [[ `ps -p $TARGET_ID -o args=` =~ $command ]]; then
echo $command running as process $TARGET_ID. Stop it first.
exit 1
fi
if [[ `ps -p $TARGET_ID -o args=` =~ $command ]]; then
echo $command running as process $TARGET_ID. Stop it first.
exit 1
fi
fi

Expand Down

0 comments on commit cf4ecc6

Please sign in to comment.