4249dff008
* 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.
17 lines
325 B
Bash
Executable File
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
|