centos_local_repo_rsync
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| centos_local_repo_rsync [2011/07/11 17:56] – created jt | centos_local_repo_rsync [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | |||
| - | |||
| - | <code bash> | ||
| - | #!/bin/bash | ||
| - | |||
| - | # name: centos-rsync | ||
| - | # date: 20110711 | ||
| - | # author: jason thomas < | ||
| - | # purpose: update local centos mirror with remote centos mirror | ||
| - | |||
| - | LOCK="/ | ||
| - | REPO="/ | ||
| - | MIRROR=" | ||
| - | |||
| - | CURRENT5=" | ||
| - | CURRENT6=" | ||
| - | |||
| - | if [ -f $LOCK ]; then | ||
| - | exit 0 | ||
| - | fi | ||
| - | |||
| - | control_sigint(){ | ||
| - | unlink $LOCK | ||
| - | exit $? | ||
| - | } | ||
| - | |||
| - | trap control_sigint SIGINT | ||
| - | |||
| - | if [ -d $REPO/ | ||
| - | touch $LOCK | ||
| - | rsync -avSHP --delete --exclude " | ||
| - | unlink $LOCK | ||
| - | fi | ||
| - | |||
| - | if [ -d $REPO/ | ||
| - | touch $LOCK | ||
| - | rsync -avSHP --delete --exclude " | ||
| - | unlink $LOCK | ||
| - | fi | ||
| - | </ | ||
centos_local_repo_rsync.1310407007.txt.gz · Last modified: 2020/08/10 02:28 (external edit)
