diff --git a/tools/deployment/osqueryd.initd b/tools/deployment/osqueryd.initd index d629c84c..7d5d4af6 100755 --- a/tools/deployment/osqueryd.initd +++ b/tools/deployment/osqueryd.initd @@ -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