[CentOS-mirror] About Cron script with lock file

Matthew Martz mdmartz at gflug.net
Wed Jan 24 22:16:51 UTC 2007

On Wed, January 24, 2007 2:44 am, Kelphon wrote:
> Dear David,
>          Does your cron script for centos mirror work now?
>          Could you please send your cron script with lockfile to us ;)
> Thanks a lot!

Simple mirror script:


# declare variables here
RSYNC="/usr/bin/rsync"			# file location of rsync
FLAGS="-aqzH --delete"			# rsync flags
MIRROR="msync.centos.org::CentOS"	# rsync mirror
REPO="/var/ftp/pub"			# directory to store files
LOCKFILE="/var/lock/rsync/centos"	# file location fo lock file

# no need to edit anything below here
if [ -f $LOCKFILE ]
        echo Lock file exists...Exiting...
        exit 0
        touch $LOCKFILE
echo Rsyncing...
exit 0

Matthew Martz
CentOS Mirror Admin
mdmartz at gflug.net

More information about the CentOS-mirror mailing list