summaryrefslogtreecommitdiff
path: root/src/testing/test_key_rotation.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/test_key_rotation.sh')
-rwxr-xr-xsrc/testing/test_key_rotation.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/testing/test_key_rotation.sh b/src/testing/test_key_rotation.sh
index cf270b3c..cf9b8353 100755
--- a/src/testing/test_key_rotation.sh
+++ b/src/testing/test_key_rotation.sh
@@ -49,21 +49,21 @@ function exit_fail() {
# Cleanup to run whenever we exit
function cleanup()
{
- for n in `jobs -p`
+ for n in $(jobs -p)
do
- kill $n 2> /dev/null || true
+ kill "$n" 2> /dev/null || true
done
- rm -rf $CONF $WALLET_DB $TMP_DIR
+ rm -rf "$CONF" "$WALLET_DB" "$TMP_DIR"
wait
}
# Exchange configuration file will be edited, so we create one
# from the template.
-CONF=`mktemp test_template.conf-XXXXXX`
+CONF=$(mktemp -p "${TMPDIR:-/tmp}" test_template.conf-XXXXXX)
cp test_key_rotation.conf $CONF
-TMP_DIR=`mktemp -d keys-tmp-XXXXXX`
-WALLET_DB=`mktemp test_wallet.json-XXXXXX`
+TMP_DIR=$(mktemp -p "${TMPDIR:-/tmp}" -d keys-tmp-XXXXXX)
+WALLET_DB=$(mktemp -p "${TMPDIR:-/tmp}" test_wallet.json-XXXXXX)
# Install cleanup handler (except for kill -9)
trap cleanup EXIT