summaryrefslogtreecommitdiff
path: root/tools/stop-fake-mode.sh
diff options
context:
space:
mode:
authorMichael Basnight <mbasnight@gmail.com>2014-02-01 00:24:57 +0000
committerMichael Basnight <mbasnight@gmail.com>2014-02-01 01:19:58 +0000
commitb06db4ab7f4bdb7843f8b75205570041a0a045d7 (patch)
tree7a3397e3033dd0b678ec3dfe1f16f61124139430 /tools/stop-fake-mode.sh
parent67e3e7a76e63b1758eba298c564f348f54704c66 (diff)
downloadtrove-b06db4ab7f4bdb7843f8b75205570041a0a045d7.tar.gz
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
Diffstat (limited to 'tools/stop-fake-mode.sh')
-rwxr-xr-xtools/stop-fake-mode.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/stop-fake-mode.sh b/tools/stop-fake-mode.sh
new file mode 100755
index 00000000..ccc42e10
--- /dev/null
+++ b/tools/stop-fake-mode.sh
@@ -0,0 +1,16 @@
+#!/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