summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-network-server
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/lora/lora-network-server')
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init11
1 files changed, 8 insertions, 3 deletions
diff --git a/recipes-connectivity/lora/lora-network-server/lora-network-server.init b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
index 75b753c..75e43c9 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -53,13 +53,18 @@ card_found() {
if [[ "$lora_id" =~ "$lora_us_id" ]] || [[ "$lora_id" =~ "$lora_eu_id" ]]; then
if [ "$lora_hw" = "$lora_hw" ] && [[ ! "$lora_id" =~ .*-SPI ]]; then
+ cp /opt/lora/global_conf.json.MTAC_LORA_1_0 /opt/lora/global_conf.json
ln -sf /opt/lora/basic_pkt_fwd-usb $pkt_fwd
return 0
- elif [ "$lora_hw" = "$lora_1_0_hw" ] || [ "$lora_hw" = "$lora_1_5_h_hw" ]; then
+ else
+ if [ "$lora_hw" = "$lora_1_0_hw" ]; then
+ cp /opt/lora/global_conf.json.MTAC_LORA_1_0 /opt/lora/global_conf.json
+ fi
+ if [ "$lora_hw" = "$lora_1_5_h_hw" ]; then
+ cp /opt/lora/global_conf.json.MTAC_LORA_1_5 /opt/lora/global_conf.json
+ fi
ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd
return 0
- else
- return 1
fi
else
return 1