[Fix #884] Remove return 1s when no action needed in init

This commit is contained in:
Teddy Reed 2015-03-19 16:34:35 -07:00
parent 6eb2d413b9
commit 4721205b25

View File

@ -66,8 +66,7 @@ start() {
PID=$(cat $PIDFILE)
PROCNAME=$(ps -p $PID -o comm\=)
if [ "$PROCNAME" = "$PROG" ]; then
echo "$PROG is already running: $PID"
return 1
return 0
else
# osqueryd pidfile exists but it's not running
rm $PIDFILE
@ -87,8 +86,7 @@ stop() {
ensure_root
if [ ! -f $PIDFILE ] ; then
echo "$PROG is not running. no pidfile found."
return 1
return 0
else
PID=$(cat $PIDFILE)
pkill -P $PID && kill -9 $PID