Repo Dir wird automatisch angelegt, falls nicht existent.

This commit is contained in:
Olli Graf
2024-11-03 14:37:41 +01:00
parent b43444d441
commit bc029140fe

View File

@@ -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