This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCK=/tmp/shardbackup.lock | |
if [ -f $LOCK ]; then | |
ps -p `cat $LOCK` > /dev/null | |
if [ $? -eq 1 ]; then | |
# Stale lock file | |
rm $LOCK | |
else | |
echo "Lock file found for running process" | |
exit 1 |
NewerOlder