summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck2
-rw-r--r--yarns.webapp/900-implementations.yarn8
2 files changed, 6 insertions, 4 deletions
diff --git a/check b/check
index 70aa608..a82754e 100755
--- a/check
+++ b/check
@@ -8,6 +8,6 @@ set -eu
# a system with the necessary dependencies installed properly. (BR-13 also
# doesn't have a working sqlite3 Python binding, and that's not so easy to
# fix without a fixed system deployed.)
-export PYTHONPATH="/home/root/new-lorry-controller/bottle:/home/root/new-lorry-controller/flup"
+export PYTHONPATH="/home/richardmaw/workspace/baserock/src/bottle:/home/richardmaw/workspace/baserock/src/flup"
yarn -s yarns.webapp/yarn.sh yarns.webapp/*.yarn --env PYTHONPATH="$PYTHONPATH" "$@"
diff --git a/yarns.webapp/900-implementations.yarn b/yarns.webapp/900-implementations.yarn
index 19d4cfc..9310f6e 100644
--- a/yarns.webapp/900-implementations.yarn
+++ b/yarns.webapp/900-implementations.yarn
@@ -24,6 +24,9 @@ but the shell doesn't wait for it to terminate. This way, WEBAPP will
be running until it crashes or is explicitly killed.
IMPLEMENTS GIVEN a running WEBAPP
+
+ rm -f "$DATADIR/webapp.port"
+ mkfifo "$DATADIR/webapp.port"
start-stop-daemon -S -x "$SRCDIR/lorry-controller-webapp" \
-b -p "$DATADIR/webapp.pid" -m --verbose \
-- \
@@ -33,10 +36,9 @@ be running until it crashes or is explicitly killed.
--debug-host 127.0.0.1 \
--debug-port-file "$DATADIR/webapp.port"
- while [ ! -e "$DATADIR/webapp.port" ]; do
- sleep 1
- done
port=$(cat "$DATADIR/webapp.port")
+ rm -f "$DATADIR/webapp.port"
+ echo "$port" >"$DATADIR/webapp.port"
# Wait for the WEBAPP to actually be ready, i.e., that it's
# listening on its assigned port.