Use mktemp for creating tempfile

This commit is contained in:
phil 2023-12-02 22:44:59 +01:00
parent 89fc555eb1
commit 012c77f2ed

View file

@ -5,7 +5,7 @@ set -eu
TEXTFILE_COLLECTOR_DIR=/var/lib/prometheus/node-exporter TEXTFILE_COLLECTOR_DIR=/var/lib/prometheus/node-exporter
PROM_FILE=$TEXTFILE_COLLECTOR_DIR/backup.prom PROM_FILE=$TEXTFILE_COLLECTOR_DIR/backup.prom
TMP_FILE=$PROM_FILE.$$ TMP_FILE=$(mktemp)
NOW=$(date +%s) NOW=$(date +%s)
BORG_INFO=$(borgmatic --no-color info --last 1 --json) BORG_INFO=$(borgmatic --no-color info --last 1 --json)