summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Bayer <bbayer@multitech.com>2016-11-28 14:58:22 -0600
committerBrandon Bayer <bbayer@multitech.com>2016-11-28 14:58:22 -0600
commit21290b67cea7e60c1c9c319e49df79faf753b0f4 (patch)
tree393af16e2ad370eee8aec3d4772a172d46917409
parent0e6680a27d3045cf10f35dae246f786d594f9e8b (diff)
downloadmeta-mlinux-21290b67cea7e60c1c9c319e49df79faf753b0f4.tar.gz
meta-mlinux-21290b67cea7e60c1c9c319e49df79faf753b0f4.tar.bz2
meta-mlinux-21290b67cea7e60c1c9c319e49df79faf753b0f4.zip
mtcap:fix: lora-packet-forwarder.init
-rwxr-xr-xrecipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init5
1 files changed, 3 insertions, 2 deletions
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