On Thursday 16 April 2015 01:44:30 am Warren Mead wrote:
> Been playing with Geoff Barkman's keep alive script for Rivendell. 
> http://geofffromdunedin.blogspot.co.nz/
> 
> I'm running Centos and  having a problem substituting my own path to rm 
> /home/geoff2/.rdairplaylock (it's not being found)
> Does the Rivendell still have a .rdairplaylock file, and if so, where is 
> it located on the Centos appliance?
> 
> Many Thanks

 I've a script that runs a DNS update, due to ATT will no longer
 sell me a static at all.
 It checks itself, in order to not run multiple times, by checking
 for a lockfile it creates, and making sure it's not stale.
 If the lockfile doesn't exist, or if it's stale, it creates or updates
 the lockfile to make it current.
 Just FYI, that portion looks like this.....
 ( modify as appropriate for your needs... )

#!/bin/sh

# Use a lockfile containing the pid of the running process
# If script crashes and leaves lockfile around, it will have a different pid so
# will not prevent script running again.
# 
lf=/tmp/dnsupdate
# create empty lock file if none exists
touch $lf
read lastPID < $lf
# if lastPID is not null and a process with that pid exists , exit
[ ! -z "$lastPID" -a -d /proc/$lastPID ] && exit
## echo not running
# save my pid in the lock file
echo $$ > $lf

#Now, the DNS updater script



-- 
Cowboy

http://cowboy.cwf1.com

Hummingbirds never remember the words to songs.
_______________________________________________
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev

Reply via email to