From 21290b67cea7e60c1c9c319e49df79faf753b0f4 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Mon, 28 Nov 2016 14:58:22 -0600 Subject: mtcap:fix: lora-packet-forwarder.init --- .../lora/lora-packet-forwarder/lora-packet-forwarder.init | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'recipes-connectivity') diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init index 8c0894a..9ffaf6d 100755 --- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init +++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init @@ -11,6 +11,7 @@ run_dir=/var/run/lora pkt_fwd=/opt/lora/lora_pkt_fwd pkt_fwd_pidfile=$run_dir/lora-pkt-fwd-1.pid log_file=/var/log/lora-pkt-fwd.log +cfg_file=/opt/lora/global_conf.json do_start() { echo "Starting $NAME: " @@ -18,8 +19,8 @@ do_start() { eui=$(mts-io-sysfs show lora/eui) # Remove colons clean_eui="${eui//:/}" - echo "Setting gateway_id in global_conf.json to $clean_eui" - sed -i "s/\"gateway_ID\": \".*\"/\"gateway_ID\": \"$clean_eui\"/" global_conf.json + echo "Setting gateway_id in $cfg_file to $clean_eui" + sed -i "s/\"gateway_ID\": \".*\"/\"gateway_ID\": \"$clean_eui\"/" $cfg_file mkdir -p $run_dir -- cgit v1.2.3