func tests: don't return pid of started process unless asked (#1821)

This commit is contained in:
mmetc 2022-10-18 13:00:35 +02:00 committed by GitHub
parent 6b0097a24b
commit 7866729d3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -37,6 +37,10 @@ start() {
-o "${LOG_DIR}/crowdsec.out" \
"${CROWDSEC}"
./bin/wait-for-port 6060
}
start_pid() {
start
cat "$DAEMON_PID"
}
@ -63,6 +67,9 @@ case "$1" in
start)
start
;;
start-pid)
start_pid
;;
stop)
stop
;;

View file

@ -33,6 +33,10 @@ fi
start() {
systemctl start crowdsec
./bin/wait-for-port 6060
}
start_pid() {
start
pidof /usr/bin/crowdsec
}
@ -50,6 +54,9 @@ case "$1" in
start)
start
;;
start-pid)
start_pid
;;
stop)
stop
;;