mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
[Fix #884] Remove return 1s when no action needed in init
This commit is contained in:
parent
6eb2d413b9
commit
4721205b25
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user