Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #80 from NebraLtd/pritam/dynamic_freq_plan_change#110
Browse files Browse the repository at this point in the history
feat: Update startup script for dual frequency plans#110
  • Loading branch information
KevinWassermann94 authored Nov 9, 2022
2 parents fd54656 + 92a8ab9 commit 7467799
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions gen-region.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#!/usr/bin/env sh

# Wait until miner knows the regulatory region.
while ! /opt/miner/bin/miner info region > /dev/null 2>&1; do
sleep 1
# we want to check and update region file forever
while :
do
# Wait until miner knows the regulatory region, we don't want to
# write some random strings to region file
while ! /opt/miner/bin/miner info region > /dev/null 2>&1; do
sleep 1
done

# update region file every 60 seconds
REGIONDATA=$(/opt/miner/bin/miner info region)
echo "$REGIONDATA" > /var/pktfwd/region
sleep 60
done

REGIONDATA=$(/opt/miner/bin/miner info region)
echo "$REGIONDATA" > /var/pktfwd/region

0 comments on commit 7467799

Please sign in to comment.