Created
October 13, 2014 15:48
-
-
Save azet/6c5da818cd74bdfc239f to your computer and use it in GitHub Desktop.
centos6{5..9} mirror hack
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
[root@mirror cron.hourly]# pwd | |
/etc/cron.hourly | |
[root@mirror cron.hourly]# cat mirror_centos6 | |
#!/usr/bin/env bash | |
[[ $(pgrep rsync) ]] && exit 0 | |
cd /net/gmi.oeaw.ac.at/software/mirror/centos/ | |
./mirror.sh &>> rsync_mirror.log | |
exit 0 | |
[root@mirror cron.hourly]# cat /net/gmi.oeaw.ac.at/software/mirror/centos/mirror.sh | |
#!/usr/bin/env bash | |
date -R | |
rsync --progress -av --delete --delete-excluded --exclude "local*" --exclude "isos" --exclude "i386" ftp.halifax.rwth-aachen.de::centos/6.{5..9} $(pwd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment