#!/bin/bash -e
#
# Create flag file to indicate gbLoadRna should stop when it reaches
# a safe place.  This can be run from any directory, but must reside
# in $gbRoot/bin
#

# get gbRoot from path to executable
scriptPath=$(which $0)
gbRoot=$(dirname $(dirname $scriptPath))
varDir=$gbRoot/var
if [ ! -d $varDir ] ; then
    echo "Error: $varDir does not exist or is not a directory" >&2
    exit 1
fi

touch $varDir/dbload.stop

echo dbload stop request
