trove/bin/stop_server.sh
Tim Simpson 4249dff008 Improved ability to run fake mode in CI environments.
* The reddwarf-server script can now fork itself and save it's pid.
* Changed the tox.ini to not start the fake mode server. Now, two new
  bin scripts start and stop the server. This should make it easier to
  run in CI environments.
2012-09-04 12:18:32 -05: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