| OLD | NEW |
| (Empty) |
| 1 #!/bin/bash | |
| 2 | |
| 3 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 # Launch stunnel once and only once. This should never crash, but if it does, | |
| 8 # everything should die. | |
| 9 stunnel \ | |
| 10 -p /engine/data/stunnel.pem \ | |
| 11 -P /engine/stunnel.pid \ | |
| 12 -d 25466 -r 25467 -f & | |
| 13 | |
| 14 # Start (and restart) the engine so long as there hasn't been an error. | |
| 15 # Currently, the engine can cleanly exit in the event that a connection is lost. | |
| 16 # In these cases, it's safe to restart the engine. However, if either stunnel or | |
| 17 # the engine exit with a nonzero return code, stop all execution. | |
| 18 while :; do | |
| 19 LD_LIBRARY_PATH=/engine/ /engine/blimp_engine_app \ | |
| 20 --android-fonts-path=/engine/fonts/font_bundle/marshmallow \ | |
| 21 --blimp-client-token-path=/engine/data/client_token \ | |
| 22 --vmodule="remote_channel_main=1,blimp*=1" \ | |
| 23 $@ & | |
| 24 | |
| 25 # Wait for a process to exit. Bomb out if anything had an error. | |
| 26 wait -n # Returns the exited process's return code. | |
| 27 retcode=$? | |
| 28 if [ $retcode -ne 0 ]; then | |
| 29 exit $retcode | |
| 30 fi | |
| 31 done | |
| OLD | NEW |