mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-26 16:07:04 +00:00
Improve bash quoting, and other similar best practices
This patch updates the shell scripts with some of the common best practices, which should make them more resilient to unusual failures and unexpected environments (in particular, directories with spaces). Most of these were identified by shellcheck.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
. $(dirname ${0})/../util/lib.sh
|
||||
. "$(dirname "$0")/../util/lib.sh"
|
||||
|
||||
init
|
||||
check_hostaliases
|
||||
@@ -72,6 +72,6 @@ fexp http://localhost:1099/exit -status 405
|
||||
# eventually exit.
|
||||
CHASQUID_PID=$(pgrep -s 0 chasquid)
|
||||
fexp http://localhost:1099/exit -method POST -bodyre "OK"
|
||||
wait_until ! kill -s 0 $CHASQUID_PID 2> /dev/null
|
||||
wait_until ! kill -s 0 "$CHASQUID_PID" 2> /dev/null
|
||||
|
||||
success
|
||||
|
||||
Reference in New Issue
Block a user