This commit is contained in:
root@saturn committed 2015-12-09 21:23:55 +01:00
commit cc339d24ae
3 files changed
+80

No files matched your search

Executable
+13
View File
@@ -0,0 +1,13 @@
#/bin/bash
#RSYNCSOURCE=rsync://ftp5.gwdg.de/pub/linux/archlinux/
#RSYNCSOURCE=rsync://mirror.nl.leaseweb.net/archlinux/
RSYNCSOURCE=rsync://mirror.one.com/archlinux/
# Define where you want the mirror-data to be on your mirror
BASEDIR=/store/mirror/archlinux
rsync --verbose --recursive --times --links --hard-links \
--stats --delete-after --ignore-errors \
${RSYNCSOURCE} ${BASEDIR} || echo "Failed to rsync from ${RSYNCSOURCE}."
date
+36
View File
@@ -0,0 +1,36 @@
#/bin/dash
fatal() {
echo "$1"
exit 1
}
warn() {
echo "$1"
}
# Find a source mirror near you which supports rsync on
# https://launchpad.net/ubuntu/+archivemirrors
# rsync://<iso-country-code>.rsync.archive.ubuntu.com/ubuntu should always work
RSYNCSOURCE=rsync://no.archive.ubuntu.com/ubuntu/
#RSYNCSOURCE=rsync://ftp.uninett.no/ubuntu/
# Define where you want the mirror-data to be on your mirror
BASEDIR=/store/mirror/ubuntu/archive/
if [ ! -d ${BASEDIR} ]; then
warn "${BASEDIR} does not exist yet, trying to create it..."
mkdir -p ${BASEDIR} || fatal "Creation of ${BASEDIR} failed."
fi
rsync -4 --verbose --recursive --times --links --hard-links \
--stats --chmod=a+rx \
--exclude "Packages*" --exclude "Sources*" \
--exclude "Release*" \
${RSYNCSOURCE} ${BASEDIR} || fatal "First stage of sync failed."
rsync -4 --verbose --recursive --times --links --hard-links \
--stats --delete --chmod=a+rx --delete-after \
${RSYNCSOURCE} ${BASEDIR} || fatal "Second stage of sync failed."
date -u > ${BASEDIR}/project/trace/$(hostname -f)
+31
View File
@@ -0,0 +1,31 @@
#/bin/dash
fatal() {
echo "$1"
exit 1
}
warn() {
echo "$1"
}
# Find a source mirror near you which supports rsync on
# https://launchpad.net/ubuntu/+cdmirrors
# rsync://<iso-country-code>.rsync.releases.ubuntu.com/releases should always work
#RSYNCSOURCE=rsync://se.rsync.releases.ubuntu.com/releases
#RSYNCSOURCE=rsync://ftp.uninett.no/ubuntu-iso
RSYNCSOURCE=rsync://ubuntu.uib.no/ubuntu-releases/
# Define where you want the mirror-data to be on your mirror
BASEDIR=/store/mirror/ubuntu/releases/
if [ ! -d ${BASEDIR} ]; then
warn "${BASEDIR} does not exist yet, trying to create it..."
mkdir -p ${BASEDIR} || fatal "Creation of ${BASEDIR} failed."
fi
rsync --verbose --recursive --times --links --hard-links \
--stats --delete-after \
${RSYNCSOURCE} ${BASEDIR} || fatal "Failed to rsync from ${RSYNCSOURCE}."
date -u > ${BASEDIR}/.trace/$(hostname -f)