add foundry script
[electrum-server.git] / stop
diff --git a/stop b/stop
index 89b1111..42571c5 100755 (executable)
--- a/stop
+++ b/stop
@@ -1,2 +1,6 @@
 #!/bin/bash
+PID=`/usr/bin/python server.py getpid`
 /usr/bin/python server.py stop
+echo "Waiting until process $PID terminates..."
+while ps -p $PID > /dev/null; do sleep 1; done
+echo "Done."