1 Apr
2010
1 Apr
'10
9:57 p.m.
On 04/01/2010 01:18 PM, Sean Walberg wrote:
#!/bin/bash TURD=/var/run/mycron.lock if [ -f $TURD ]; then exit fi touch $TURD # do stuff rm $TURD
I find it helpful to have: ... TURD=/var/run/mycron.lock trap "rm -f $TURD" 0 ... So that the file will be removed when the shell exits. I have also used the procmail 'lockfile' command for situations where I wanted a shorter term lock. Peter