Ticket #6258: index_regen.patch

File index_regen.patch, 782 bytes (added by danielluke (Daniel J. Luke), 19 years ago)

Patch to use lockfile

  • IndexRegen.sh

    old new  
    99####
    1010
    1111# Configuration
     12LOCKFILE=/tmp/.dp_index_regen.lock
    1213# ROOT directory, where everything is. This must exist.
    1314ROOT=/Users/pguyot/dp-portindex
    1415# SSH key. This must exist.
     
    4748# The date.
    4849DATE=$(date +'%A %Y-%m-%d at %H:%M:%S')
    4950
     51if [ ! -e $LOCKFILE ]; then
     52        touch $LOCKFILE
     53else
     54        echo "Index Regen lockfile found, is another index regen running?"
     55        exit 1
     56fi
     57
    5058# Create the SSH wrapper if it doesn't exist (comment this for -d /Volumes...)
    5159if [ ! -e $SSH_KEY ]; then
    5260        echo "Key doesn't exist. The script is configured to find the SSH key at:"
     
    140148        rm -f $COMMIT_MSG $FAILURE_LOG
    141149fi
    142150
     151rm -f $LOCKFILE