~sungo/sbs-http

sbs-http/runner.sh -rwxr-xr-x 924 bytes
763ad0f8 — sungo restructure a bit 1 year, 9 months ago
                                                                                
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
#!/bin/sh

: ${SBS_URL:="localhost:30003"}
: ${SBS_LISTEN:=":8000"}
: ${SBS_CLIENT_REFRESH:=200}
: ${SBS_RECEIVER_LAT:=0}
: ${SBS_RECEIVER_LON:=0}
: ${SBS_AIRCRAFT_TIMEOUT:=60}
: ${SBS_EXPIRY_CHECK_TIME:=1}
: ${SBS_INSECURE_CORS:=1}
: ${SBS_RECONNECT_TIME:=1}

if test $SBS_INSECURE_CORS -gt 0; then 
	exec sbshttp \
		-sbs-url ${SBS_URL} \
		-listen ${SBS_LISTEN} \
		-lat ${SBS_RECEIVER_LAT} \
		-lon ${SBS_RECEIVER_LON} \
		-client-refresh ${SBS_CLIENT_REFRESH} \
		-aircraft-timeout ${SBS_AIRCRAFT_TIMEOUT} \
		-expiry-check ${SBS_EXPIRY_CHECK_TIME} \
		-sbs-reconnect ${SBS_RECONNECT_TIME}
else
	exec sbshttp \
		-sbs-url ${SBS_URL} \
		-listen ${SBS_LISTEN} \
		-lat ${SBS_RECEIVER_LAT} \
		-lon ${SBS_RECEIVER_LON} \
		-client-refresh ${SBS_CLIENT_REFRESH} \
		-aircraft-timeout ${SBS_AIRCRAFT_TIMEOUT} \
		-expiry-check ${SBS_EXPIRY_CHECK_TIME} \
		-sbs-reconnect ${SBS_RECONNECT_TIME} \
		-disable-insecure-cors
fi