This commit is contained in:
Ray Ozzie 2016-03-22 11:26:14 -07:00
parent 14fe106886
commit 634a35e96c
4 changed files with 10 additions and 13 deletions

View File

@ -80,9 +80,6 @@ if [ ! -d bin ]; then mkdir bin; fi
if [ -f ./bin/poly_pkt_fwd ]; then rm ./bin/poly_pkt_fwd; fi
ln -s $INSTALL_DIR/packet_forwarder/poly_pkt_fwd/poly_pkt_fwd ./bin/poly_pkt_fwd
# copy initial global configuration file
# cp -f ./packet_forwarder/poly_pkt_fwd/global_conf.json ./bin/global_conf.json
# Restore location back to where we started the install
popd

View File

@ -79,7 +79,9 @@ popd
if [ ! -d bin ]; then mkdir bin; fi
if [ -f ./bin/poly_pkt_fwd ]; then rm ./bin/poly_pkt_fwd; fi
ln -s $INSTALL_DIR/packet_forwarder/poly_pkt_fwd/poly_pkt_fwd ./bin/poly_pkt_fwd
cp -f ./packet_forwarder/poly_pkt_fwd/global_conf.json ./bin/global_conf.json
# copy initial global configuration file
# cp -f ./packet_forwarder/poly_pkt_fwd/global_conf.json ./bin/global_conf.json
# Restore location back to where we started the install

View File

@ -60,9 +60,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 +73,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

View File

@ -60,14 +60,12 @@ echo ""
# load the region-appropriate global conf
echo eval curl "https://raw.githubusercontent.com/rayozzie/ttn-gateway-conf/master/$GATEWAY_REGION-global-conf.json --output ./global-conf.json
eval curl "https://raw.githubusercontent.com/rayozzie/ttn-gateway-conf/master/$GATEWAY_REGION-global-conf.json --output ./global-conf.json
err=$?
if [ $err -ne 0 ]
if curl --fail "https://raw.githubusercontent.com/rayozzie/ttn-gateway-conf/master/$GATEWAY_REGION-global-conf.json --output ./global-conf.json
then
sleep 1
else
echo "******************"
echo "ERROR: GATEWAY_REGION not found: $err"
echo "ERROR: GATEWAY_REGION not found"
echo "******************"
while true; do sleep 10; done # don't exit in resin
exit 1