From b043882c15cafc0f19de3956d16b47d45e394016 Mon Sep 17 00:00:00 2001 From: Ray Ozzie Date: Tue, 22 Mar 2016 12:09:41 -0700 Subject: [PATCH] xxx --- resin-run.sh | 4 ++-- resin-run.sh~ | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/resin-run.sh b/resin-run.sh index 701ee68..633b7ca 100755 --- a/resin-run.sh +++ b/resin-run.sh @@ -65,8 +65,8 @@ fi # create local.conf -echo -e "{\n\\ -t\"gateway_conf\": {\n\ +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\ diff --git a/resin-run.sh~ b/resin-run.sh~ index 769902a..701ee68 100755 --- a/resin-run.sh~ +++ b/resin-run.sh~ @@ -52,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" @@ -65,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