Last active
December 22, 2021 23:06
-
-
Save jmkim/6723a4326eb4da10d715cfc9dd714ebb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MIRRORS=( | |
"archlinux:mirrors.tuna.tsinghua.edu.cn:archlinux" | |
"CPAN:cpan-rsync.perl.org:CPAN" | |
"CRAN:cran.r-project.org:CRAN" | |
"CTAN:rsync.dante.ctan.org:CTAN" | |
"debian:rsync.osuosl.org:debian" | |
"debian-archive:mirror.math.princeton.edu:pub/debian-archive/" | |
"debian-cd:ftp.acc.umu.se:debian-cd" | |
"debian-cd-weekly:ftp.acc.umu.se:cdimage/weekly-builds/" | |
"debian-ports:ftp.kaist.ac.kr:debian-ports" | |
"debian-security:rsync.security.debian.org:debian-security" | |
"deb-multimedia:www.deb-multimedia.org:deb" | |
"deepin:rsync.deepin.com:deepin" | |
"deepin-cd:rsync.deepin.com:releases" | |
"dotdeb:rsync.dotdeb.org:packages" | |
"eclipse:rsync.osuosl.org:eclipse" | |
"kali:archive.kali.org:kali" | |
"kali-images:archive.kali.org:kali-images" | |
"linuxmint:rsync-packages.linuxmint.com:packages" | |
"linuxmint-iso:pub.linuxmint.com:pub" | |
"mariadb:rsync.osuosl.org:mariadb" | |
"mxlinux:iso.mxrepo.com:workspace" | |
"mxlinux-iso:rsync-mxlinux.org:MX-Linux" | |
"raspberrypi:apt-repo.raspberrypi.org:archive/debian/" | |
"raspbian:archive.raspbian.org:archive" | |
"ubuntu:rsync.archive.ubuntu.com:ubuntu" | |
"ubuntu-cdimage:rsync.cdimage.ubuntu.com:cdimage" | |
"ubuntu-ports:rsync.ports.ubuntu.com:ubuntu-ports" | |
"ubuntu-releases:rsync.releases.ubuntu.com:releases" | |
) | |
for mirror in ${MIRRORS[@]} | |
do | |
MIRRORID="$(echo $mirror | awk -F':' '{ print $1; }')" | |
RSYNC_HOST="$(echo $mirror | awk -F':' '{ print $2; }')" | |
RSYNC_PATH="$(echo $mirror | awk -F':' '{ print $3; }')" | |
echo "MIRRORNAME=\"ftp.harukasan.org\" | |
TO=\"/mnt/mirrors/archvsync/mirrors/$MIRRORID\" | |
LOGDIR=\"/var/log/archvsync/$MIRRORID\" | |
HUB=false | |
RSYNC_HOST=\"$RSYNC_HOST\" | |
RSYNC_PATH=\"$RSYNC_PATH\" | |
# RSYNC_USER= | |
# RSYNC_PASSWORD= | |
INFO_MAINTAINER=\"Jongmin Kim <jmkim@pukyong.ac.kr>, Harukasan FTP Team <harukasan-ftp@lists.launchpad.net>\" | |
INFO_SPONSOR=\"Harukasan <https://harukasan.org>, Information and Database Systems Laboratory @ Pukyong National University <http://db.pknu.ac.kr>\" | |
INFO_COUNTRY=KR | |
INFO_LOCATION=\"Busan\" | |
INFO_THROUGHPUT=10Gb | |
MAILTO=\"kdzlvaids@gmail.com\"" > ftpsync-$MIRRORID.conf | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MIRRORLIST=( | |
"archlinux" | |
"CPAN" | |
"CRAN" | |
"CTAN" | |
"debian" | |
"debian-archive" | |
"debian-cd" | |
"debian-cd-weekly" | |
"debian-ports" | |
"debian-security" | |
"deb-multimedia" | |
"deepin" | |
"deepin-cd" | |
"dotdeb" | |
"eclipse" | |
"kali" | |
"kali-images" | |
"linuxmint" | |
"linuxmint-iso" | |
"mariadb" | |
"mxlinux" | |
"mxlinux-iso" | |
"raspberrypi" | |
"raspbian" | |
"ubuntu" | |
"ubuntu-cdimage" | |
"ubuntu-ports" | |
"ubuntu-releases" | |
) | |
for mirror in ${MIRRORLIST[@]} | |
do | |
echo $mirror | |
curl -o ftpsync-${mirror}.conf http://ftp.harukasan.org/${mirror}/project/trace/ftp.harukasan.org | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment