Script for image synchronization enabled

This commit is contained in:
Игорь Чудов 2019-10-14 19:16:12 +04:00
parent 8fd74f8242
commit 8c56288a43
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC
2 changed files with 3 additions and 4 deletions

View File

@ -209,7 +209,7 @@ for (i = 0; i < images.size(); i++) {
} }
triggers { triggers {
// Make a pause for sync during working hours // Make a pause for sync during working hours
cron('H 3,7,9,20,23 * * *') //cron('H 3,7,9,20,23 * * *')
} }
steps { steps {
shell("/usr/bin/env IMAGES_DEST=" + '${IMAGES_DEST}' + " IMAGE=${images[i]} FILE=${filename} /bin/sh ./scripts/sync_image") shell("/usr/bin/env IMAGES_DEST=" + '${IMAGES_DEST}' + " IMAGE=${images[i]} FILE=${filename} /bin/sh ./scripts/sync_image")

View File

@ -3,7 +3,7 @@ set -eu
# Script to synchronize ALT Linux repository branches from remote # Script to synchronize ALT Linux repository branches from remote
# sources to local. # sources to local.
IMAGES_DEST="${IMAGES_DEST:-/data/mirrors/alt}" IMAGES_DEST="${IMAGES_DEST:-/data/shared/iso}"
IMAGE=${IMAGE:-NULL} IMAGE=${IMAGE:-NULL}
FILE=${FILE:-NULL} FILE=${FILE:-NULL}
@ -12,8 +12,7 @@ mkdir -p "${IMAGES_DEST}"
echo "Syncing: ${IMAGE}" echo "Syncing: ${IMAGE}"
echo "Syncing to: ${IMAGES_DEST}/${FILE}" echo "Syncing to: ${IMAGES_DEST}/${FILE}"
echo "Not implemented yet:" wget -c -nc -O "${IMAGES_DEST}/${FILE}" "${IMAGE}"
echo "wget -O ${IMAGES_DEST}/${FILE} ${IMAGE}"
exit $? exit $?