[CentOS-mirror] cron lock file
Mihai Maties
mihai at xcyb.orgTue Sep 13 08:35:53 UTC 2005
- Previous message: [CentOS-mirror] cron lock file
- Next message: [CentOS-mirror] my mirror goes down
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tuesday 13 September 2005 12:30, Mirror-Admin intergenia AG wrote: > Hi, > > easiest way to prevent doubles is checking the process list. E.G. create a > bash-script for your mirroring, that checks if there is already a > connection to msync.centos.org::CentOS > > ---- SNIP ---- > #!/bin/bash > > if [ "$(ps auxw|grep msync.centos.org::CentOS|grep -v grep" != "" ];then A better condition would be: pgrep -f "rsync -options msync.centos.org ..." >/dev/null if [ $? -eq 1 ]; then echo "You should start the mirror, no sync in progress" else echo "Another sync is in progress" fi ...but this is begining to be a shell programming issue more than a mirror-setup thingie. Mihai -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://www.bitdefender.com/
- Previous message: [CentOS-mirror] cron lock file
- Next message: [CentOS-mirror] my mirror goes down
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS-mirror mailing list