trove/tools/stop-fake-mode.sh
Michael Basnight b06db4ab7f Migrating trove to entry points
PBR/Distribute generates binscripts for us. By moving the
binscript code into the source tree, we can unit test it
as well. Run setup.py develop to generate the binscripts for
development use.

implements blueprint entrypoints-for-binscripts
Change-Id: I9ad4bb4ddc55f64bcd806c588a795cd6e0847aa9
2014-02-01 01:19:58 +00:00

17 lines
325 B
Bash
Executable File

#!/usr/bin/env bash
# Arguments: if given the first argument is the location of a pid file.
if [ $# -lt 1 ]; then
export PID_FILE=".pid"
else
export PID_FILE=$1
fi
if [ -f $PID_FILE ];
then
cat $PID_FILE
kill `cat $PID_FILE`
echo "Stopping server."
rm $PID_FILE
else
echo "pid file not found."
fi