diff --git a/pilerBackup/pilerbackup.sh b/pilerBackup/pilerbackup.sh index d0500cc..d3c2d83 100755 --- a/pilerBackup/pilerbackup.sh +++ b/pilerBackup/pilerbackup.sh @@ -421,7 +421,8 @@ printf "%s[%s] -- [INFO] %s%s%s imported --%s\n" \ ## create tmp directory and change to it for export operations # create temporary directory to dump exported email from piler -if ! exportDir=$( mktemp -d 2>>"$logFile" ); then +tmpdir="/tmp/emailbackup/$( date +%F_%T )" +if ! exportDir=$( mkdir -p "${tmpdir}" 2>>"$logFile" ); then exitError 111 "Could not create temporary directory for exported EML files" fi # grant pilerUser permission to write to temporary directory @@ -693,4 +694,4 @@ exit 0 # 130: null configuration variable in details file # 131: invalid configuration variable in details file # 138: borg exited with a critical error -# 139: borg prune exited with a critical error \ No newline at end of file +# 139: borg prune exited with a critical error