diff options
Diffstat (limited to 'src/appMain/start.sh')
-rw-r--r-- | src/appMain/start.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/appMain/start.sh b/src/appMain/start.sh index ea6dea9d50..df867c75af 100644 --- a/src/appMain/start.sh +++ b/src/appMain/start.sh @@ -1,2 +1,18 @@ #!/bin/bash -LD_LIBRARY_PATH=. ./smartDeviceLinkCore
\ No newline at end of file +trap close INT + +function close() { + $DIR/core.sh stop +} + +DIR=$(dirname $0) +CORE_PID_FILE=${DIR}/core.pid + +$DIR/core.sh start + +# Wait for the application to close +CORE_PID=$(cat $CORE_PID_FILE) +tail --pid=$CORE_PID -f /dev/null + +# Verify that the application closed sucessfully +close > /dev/null |