use $TMPDIR if available

This commit is contained in:
Jérémy Lecour 2024-03-22 11:32:18 +01:00 committed by Jérémy Lecour
parent da1d4356dd
commit 699ed5a781
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY
2 changed files with 4 additions and 3 deletions

View file

@ -21,6 +21,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
* add evobackupctl script
* change the "zzz_evobackup" script to a template, easy to copy with evobackupctl
* use env-based shebang for shell scripts
* use $TMPDIR if available
### Deprecated

View file

@ -252,15 +252,15 @@ relative_date() {
new_tmp_file() {
name=${1:-}
mktemp --tmpdir=/tmp "bkctld.${$}.${name}.XXXXX"
mktemp --tmpdir "bkctld.${$}.${name}.XXXXX"
}
new_tmp_dir() {
name=${1:-}
mktemp --directory --tmpdir=/tmp "bkctld.${$}.${name}.XXXXX"
mktemp --directory --tmpdir "bkctld.${$}.${name}.XXXXX"
}
cleanup_tmp() {
find /tmp -name "bkctld.${$}.*" -delete
find "${TMPDIR:-/tmp}" -name "bkctld.${$}.*" -delete
}
new_lock_file() {
lock_file=${1:-}