diff options
Diffstat (limited to 'yarns.webapp/900-implementations.yarn')
-rw-r--r-- | yarns.webapp/900-implementations.yarn | 8 |
1 files changed, 5 insertions, 3 deletions
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. |