summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-01-30 17:05:46 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-01-30 17:05:46 +0000
commit2691364384c1ea1871ed2aa5925937ac133660ad (patch)
tree412d0f23009e127b7e8a77d263cc7cd648a4c87f
parentb3efec32e99e137bcd96ee8c7c6a5372455aa954 (diff)
parent2d056392e6806e075d55d5753c93a0fb18785c52 (diff)
downloadlorry-controller-2691364384c1ea1871ed2aa5925937ac133660ad.tar.gz
Merge remote-tracking branch 'origin/richardmaw/ephemeral-port' into liw/daemonise
Resolved a conflict and undid Richard's check changes so I can run check.
-rw-r--r--yarns.webapp/900-implementations.yarn6
1 files changed, 3 insertions, 3 deletions
diff --git a/yarns.webapp/900-implementations.yarn b/yarns.webapp/900-implementations.yarn
index 209159d..2d24c44 100644
--- a/yarns.webapp/900-implementations.yarn
+++ b/yarns.webapp/900-implementations.yarn
@@ -26,6 +26,7 @@ be running until it crashes or is explicitly killed.
IMPLEMENTS GIVEN a running WEBAPP
rm -f "$DATADIR/webapp.pid"
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 \
-- \
@@ -36,10 +37,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.