From cf80056e2cc1c3e9d7c246aa96388a5f0a1d959a Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Mon, 8 Jun 2020 18:04:28 -0400 Subject: Add start.sh which uses the new core.sh --- src/appMain/CMakeLists.txt | 4 ++++ src/appMain/start.sh | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/appMain/start.sh diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt index b7fc045a9f..b2d4bf75bf 100644 --- a/src/appMain/CMakeLists.txt +++ b/src/appMain/CMakeLists.txt @@ -255,6 +255,10 @@ else() GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() +install(FILES start.sh DESTINATION bin + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ + GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + if(BUILD_TESTS) add_subdirectory(test) endif() diff --git a/src/appMain/start.sh b/src/appMain/start.sh new file mode 100644 index 0000000000..df867c75af --- /dev/null +++ b/src/appMain/start.sh @@ -0,0 +1,18 @@ +#!/bin/bash +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 -- cgit v1.2.1