Skip to content

Instantly share code, notes, and snippets.

@flat235
Created December 17, 2016 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flat235/6843972602eb4586ac860c9b6fcf4429 to your computer and use it in GitHub Desktop.
Save flat235/6843972602eb4586ac860c9b6fcf4429 to your computer and use it in GitHub Desktop.
make/update a debian mirror
#!/bin/bash
# configuration
MIRROR='ftp.de.debian.org'
ARCH='i386,amd64'
SECTIONS='main,contrib,non-free,main/debian-installer'
RELEASE='jessie'
MIRRORDIR=/srv/ftp
# end of configuration
DISTS="${RELEASE},${RELEASE}-updates,${RELEASE}-backports"
COMMONOPTS="-v -a ${ARCH} -s ${SECTIONS} --i18n --passive --ignore-missing-release --ignore-release-gpg --slow-cpu"
mkdir -p $MIRRORDIR/debian
mkdir -p $MIRRORDIR/debian-security
debmirror $COMMONOPTS -r debian -h $MIRROR -d $DISTS $MIRRORDIR/debian
debmirror $COMMONOPTS -r debian-security -h security.debian.org -d $RELEASE/updates $MIRRORDIR/debian-security
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment