summaryrefslogtreecommitdiff
path: root/src/appMain/start.sh
blob: df867c75aff9bd7a1565691500844374e6fa9111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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