diff --git a/backupsd b/backupsd index 5b9aca1..7f44463 100755 --- a/backupsd +++ b/backupsd @@ -54,7 +54,9 @@ echo "sha512dest= ${sha512dest}" if [ "${sha512src}" = "${sha512dest}" ]; then echo "compressing image with ${CMD_COMPRESS}" ${CMD_COMPRESS} ${FILE} + REPO_DIR="${BACKUP_REPO}/${HOSTNAME}" echo "moving compressed image to repo" + if [ ! -d "${REPO_DIR}" ]; then mkdir "${REPO_DIR}"; fi FILE="${FILE}.bz2" mv ${FILE} "${BACKUP_REPO}/${HOSTNAME}" exit 0