[CentOS-docs] New HowTo on Local Mirrors
JohnS
jses27 at gmail.com
Sun Apr 5 17:49:20 UTC 2009
On Sun, 2009-04-05 at 00:16 +0200, Tru Huynh wrote:
> On Sat, Apr 04, 2009 at 04:37:19PM -0400, Phil Schaffner wrote:
> > Created a new HowTo on running your own local mirror:
> > http://wiki.centos.org/HowTos/CreateLocalMirror
> >
> > Comments and (constructive :-) criticism are invited.
> >
> nice writeup, just my 2 cents: consider adding a lockfile if the script
> is used automatically in a crontab ;)
>
> ...
> # try to create the lock and check the outcome
> LOCKFILE=/var/run/rsync-home.lock
> lockfile -r 0 ${LOCKFILE} 1>/dev/null 2>&1
> status=$?
>
> if [ ${status} -ne 0 ] ;then
> echo "Another instance already running. Aborting."
> exit 1
> fi
> trap "rm ${LOCKFILE}" EXIT
>
> # body of the script here
> ...
>
> other examples are also available in the centos-mirror mailing list archives.
>
> Cheers,
>
> Tru
---\
But not like this above
JohnStanley
More information about the CentOS-docs
mailing list