fix shellcheck errors
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Simon Vieille 2022-12-31 13:34:22 +01:00
parent 53f740c604
commit 526992f73b
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -31,11 +31,11 @@ check_pid() {
PID=$1
LOOP=$2
for i in $(seq 1 $LOOP); do
for i in $(seq 1 "$LOOP"); do
test -d "/proc/$PID/" && sleep 1 || STATUS=0
done
kill -9 $PID
kill -9 "$PID"
printf "%d" ${STATUS:-1}
}
@ -64,9 +64,9 @@ main() {
SCRIPT_PID=$(run_script "$SCRIPT_FILE")
EXIT_STATUS=$(check_pid "$SCRIPT_PID" "$TIMEOUT")
stop_delete_script $PID "$SCRIPT_FILE"
stop_delete_script "$PID" "$SCRIPT_FILE"
exit $EXIT_STATUS
exit "$EXIT_STATUS"
}
trap on_interrupt INT