[CentOS-mirror] setup mirror and lock files

Wed Feb 27 23:01:15 UTC 2013
Ryan Becker <Ryan at techbnc.org>

Hi Jim, it's quite easy to do with a script. This first section here checks
to see if a lock is present, and if it is, the script bails:

if [ -f /var/lock/subsys/rsync_updates ]; then
    echo "Updates via rsync already running."
    echo "--ERROR: REPOSITORY SYNC ABORTED AT `date`--"
    exit 0
fi

When I begin my sync, it touches the lock file (touch
/var/lock/subsys/rsync_updates), and when finished, removes it (/bin/rm -f
/var/lock/subsys/rsync_updates). If you need any help or wish to see my
full script, just let me know and I can provide it.


On Wed, Feb 27, 2013 at 5:03 PM, Jim Hartnett <mirrors at gawsolutions.us>wrote:

> i have the mirror initially synced, but need to setup lock files.
> documentation said to ask the mailing list
>
> mirror Url: http://mirrors.gawsolutions.us/centos
> bandwidth: 100 Mbps up/down unmetered transfer
> located in dallas, tx, usa
> Geeks at Work Solutions
> centos machine with apache
> rsync twice a day at offset minutes (reduces peak for even hour starts)
>
> -Jim, Geeks at Work Solutions
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>
> _______________________________________________
> CentOS-mirror mailing list
> CentOS-mirror at centos.org
> http://lists.centos.org/mailman/listinfo/centos-mirror
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-mirror/attachments/20130227/65b73023/attachment-0006.html>