New HowTo on Local Mirrors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-- 
Tru Huynh (mirrors, CentOS-3 i386/x86_64 Package Maintenance)
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBEFA581B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.centos.org/pipermail/centos-docs/attachments/20090405/10ed2022/attachment.bin 


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Users]     [CentOS Virtualization]     [Linux Media]     [Asterisk]     [Netdev]     [X.org]     [Xfree86]     [Linux USB]     [Project Hail Cloud Computing]

  Powered by Linux