-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathuse_existing_adsb.sh
More file actions
executable file
·41 lines (31 loc) · 831 Bytes
/
use_existing_adsb.sh
File metadata and controls
executable file
·41 lines (31 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
#
# This script is used to run the application locally in development mode
# and it will establish a connection to an existing ADS-B receiver
# via websockify.
#
source src/.env
if [ -z $SKIES_ADSB_USE_EXISTING_ADSB ]; then
echo "SKIES_ADSB_USE_EXISTING_ADSB not found. Please set SKIES_ADSB_USE_EXISTING_ADSB in .env file."
exit 1
fi
#
# kill previous Flask server and websockify instances
#
pkill -f "flask run" || true
pkill -f websockify || true
#
# activate Python virtual environment so we can run Flask + websockify
#
source .venv/bin/activate
#
# start Flask server and websockify
#
export FLASK_ENV=development && cd flask && flask run -h 0.0.0.0 &
sleep 1
websockify 30006 $SKIES_ADSB_USE_EXISTING_ADSB &
sleep 1
#
# start the application local HTTP development server
#
npx vite --host