Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CHUKWA-677. Added pid file check before starting processes. (Sreepath…
…i Prasanna via Eric Yang)

git-svn-id: https://svn.apache.org/repos/asf/incubator/chukwa/trunk@1424080 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
macroadster committed Dec 19, 2012
1 parent dac18b1 commit e6ef506c6941c73555695fbe71050eba1c57c1a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
@@ -30,6 +30,8 @@ Trunk (unreleased changes)

BUGS

CHUKWA-677. Added pid file check before starting processes. (Sreepathi Prasanna via Eric Yang)

CHUKWA-676. Exclude temporarily data from release audit tools. (Eric Yang)

CHUKWA-672. Fix adaptor not found in checkpoint after shutdown. (shreyas subramanya via asrabkin)
@@ -160,12 +160,18 @@ elif [ "$COMMAND" = "tail" ]; then
exit 0
fi

pid="${CHUKWA_PID_DIR}/$PID.pid"
if [ "$1" = "stop" ]; then
if [ -e ${CHUKWA_PID_DIR}/$PID.pid ]; then
kill -TERM `cat ${CHUKWA_PID_DIR}/$PID.pid`
if [ -e $pid ]; then
kill -TERM `cat $pid`
else
echo "Cannot find PID file - $PID.pid; NO $PID to stop";
fi
elif [ -f $pid ]; then
if kill -0 `cat $pid` > /dev/null 2>&1; then
echo $command running as process `cat $pid`. Stop it first.
exit 1
fi
else
# run command
if [ "$BACKGROUND" = "false" ]; then

0 comments on commit e6ef506

Please sign in to comment.