FreeBSD....which brings me to this new issue... I am mainly using cron to rsync a dir from a remote machine to a local machine. I usally use a script and use pgrep to check if rsync is running. I'm finding that this is spotty at best on Solaris (though it never failed on FreeBSD)
I'm not sure why this should be. Basically, what i want is this: I want my script to run, if it sees that rsync is currently running then i want it to exit. If it sees that rsync is NOT running then i want it to run rsync. This always worked on FreeBSD but what i'm finding here is that it works fine for the first 2-3 hours then i eventually end up with a ton of rsync's and ssh's running. here is the script i'm trying to use. I'm changing hostname but you should be able to get the idea. #!/bin/sh PATH=/bin:/usr/bin:/usr/sbin SERVICE='rsync' REMOTE='wonsl...@www.example.com:/some/dir/' LOCAL='/tank/nas/dump/' LOG='/var/log/rsync.log' if pgrep -u $USER $SERVICE then echo "$SERVICE is running, skipping" else $SERVICE -ave ssh --delete $REMOTE $LOCAL >>$LOG fi -- This message posted from opensolaris.org _______________________________________________ opensolaris-help mailing list opensolaris-help@opensolaris.org