xxx
This commit is contained in:
parent
634a35e96c
commit
be08efa9dd
23
resin-run.sh
23
resin-run.sh
@ -1,13 +1,5 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Display the environment, which is useful when debugging
|
||||
|
||||
echo "******************"
|
||||
echo "*** Environment:"
|
||||
env
|
||||
echo "******************"
|
||||
echo ""
|
||||
|
||||
# Configure the global and local configuration files via the environment
|
||||
|
||||
echo "******************"
|
||||
@ -60,9 +52,9 @@ echo ""
|
||||
|
||||
# load the region-appropriate global conf
|
||||
|
||||
if curl --fail https://raw.githubusercontent.com/rayozzie/ttn-gateway-conf/master/$GATEWAY_REGION-global-conf.json --output ./global-conf.json
|
||||
if curl --fail https://raw.githubusercontent.com/rayozzie/ttn-gateway-conf/master/$GATEWAY_REGION-global_conf.json --output ./global_conf.json
|
||||
then
|
||||
echo Successfully loaded $GATEWAY_REGION-global-conf.json from TTN repo
|
||||
echo Successfully loaded $GATEWAY_REGION-global_conf.json from TTN repo
|
||||
else
|
||||
echo "******************"
|
||||
echo "ERROR: GATEWAY_REGION not found"
|
||||
@ -73,7 +65,16 @@ fi
|
||||
|
||||
# create local.conf
|
||||
|
||||
echo -e "{\n\t\"gateway_conf\": {\n\t\t\"gateway_ID\": \"0000000000000000\",\n\t\t\"ref_latitude\": $GATEWAY_LAT,\n\t\t\"ref_longitude\": $GATEWAY_LON,\n\t\t\"ref_altitude\": $GATEWAY_ALT,\n\t\t\"contact_email\": \"$GATEWAY_EMAIL\",\n\t\t\"description\": \"$GATEWAY_NAME\" \n\t}\n}" >./local_conf.json
|
||||
echo -e "{\n\\
|
||||
t\"gateway_conf\": {\n\
|
||||
\t\t\"gateway_ID\": \"0000000000000000\",\n\
|
||||
\t\t\"ref_latitude\": $GATEWAY_LAT,\n\
|
||||
\t\t\"ref_longitude\": $GATEWAY_LON,\n\
|
||||
\t\t\"ref_altitude\": $GATEWAY_ALT,\n\
|
||||
\t\t\"contact_email\": \"$GATEWAY_EMAIL\",\n\
|
||||
\t\t\"description\": \"$GATEWAY_NAME\" \n\
|
||||
\t}\n\
|
||||
}" >./local_conf.json
|
||||
|
||||
# Reset gateway ID based on MAC
|
||||
|
||||
|
@ -1,13 +1,5 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Display the environment, which is useful when debugging
|
||||
|
||||
echo "******************"
|
||||
echo "*** Environment:"
|
||||
env
|
||||
echo "******************"
|
||||
echo ""
|
||||
|
||||
# Configure the global and local configuration files via the environment
|
||||
|
||||
echo "******************"
|
||||
@ -60,9 +52,9 @@ echo ""
|
||||
|
||||
# load the region-appropriate global conf
|
||||
|
||||
if curl --fail "https://raw.githubusercontent.com/rayozzie/ttn-gateway-conf/master/$GATEWAY_REGION-global-conf.json --output ./global-conf.json
|
||||
if curl --fail https://raw.githubusercontent.com/rayozzie/ttn-gateway-conf/master/$GATEWAY_REGION-global-conf.json --output ./global-conf.json
|
||||
then
|
||||
sleep 1
|
||||
echo Successfully loaded $GATEWAY_REGION-global-conf.json from TTN repo
|
||||
else
|
||||
echo "******************"
|
||||
echo "ERROR: GATEWAY_REGION not found"
|
||||
@ -73,7 +65,7 @@ fi
|
||||
|
||||
# create local.conf
|
||||
|
||||
echo -e "{\n\t\"gateway_conf\": {\n\t\t\"gateway_ID\": \"0000000000000000\",\n\t\t\"servers\": [ { \"server_address\": \"croft.thethings.girovito.nl\", \"serv_port_up\": 1700, \"serv_port_down\": 1701, \"serv_enabled\": true } ],\n\t\t\"ref_latitude\": $GATEWAY_LAT,\n\t\t\"ref_longitude\": $GATEWAY_LON,\n\t\t\"ref_altitude\": $GATEWAY_ALT,\n\t\t\"contact_email\": \"$GATEWAY_EMAIL\",\n\t\t\"description\": \"$GATEWAY_NAME\" \n\t}\n}" >./local_conf.json
|
||||
echo -e "{\n\t\"gateway_conf\": {\n\t\t\"gateway_ID\": \"0000000000000000\",\n\t\t\"ref_latitude\": $GATEWAY_LAT,\n\t\t\"ref_longitude\": $GATEWAY_LON,\n\t\t\"ref_altitude\": $GATEWAY_ALT,\n\t\t\"contact_email\": \"$GATEWAY_EMAIL\",\n\t\t\"description\": \"$GATEWAY_NAME\" \n\t}\n}" >./local_conf.json
|
||||
|
||||
# Reset gateway ID based on MAC
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user