-
Notifications
You must be signed in to change notification settings - Fork 0
/
start
executable file
·37 lines (33 loc) · 1.24 KB
/
start
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
#!/bin/bash
# RF24 Compilation
#cd ./RF24-$RF24_VERSION && sudo make install
# RF24Network Compilation
#cd ../RF24Network-$RF24NETWORK_VERSION && sudo make install
# RF24Network Server Compilation
#cd ../rf24network-server && make
#chmod +x ./rf24network_rx
#mkdir -p /data/logs/rf24network-server
#touch /data/logs/rf24network-server/rf24network_rx.log
# Run the RF24Network Server Parsing messages from Nodes
#./rf24network_rx > /data/logs/rf24network-server/rf24network_rx.log &
#Run python-serial parser
mkdir -p /data/logs/python-serial
touch /data/logs/python-serial/out.log
touch /data/logs/python-serial/err.log
python python-serial/main.py >/data/logs/python-serial/out.log 2>/data/logs/python-serial/err.log &
# Run Wifi Connect
if [[ "$INITSYSTEM" == "on" ]]; then
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host_run/dbus/system_bus_socket npm start
else
npm start
fi
# We run the Python server after the wifi connection has been established.
mkdir -p /data/logs/python-server
touch /data/logs/python-server/out.log
touch /data/logs/python-server/err.log
python python-server/main.py >/data/logs/python-server/out.log 2>/data/logs/python-server/err.log &
while true
do
echo "App exited but container is still running to allow web terminal access"
sleep 3600
done