Skip to content

Commit

Permalink
readsb-gain: allow changing gain without restarting the service
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Nov 3, 2024
1 parent e8ce2c5 commit e5bfd43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readsb-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ gain="$1"
if ! [[ $gain =~ $validre ]] ; then echo "Error, invalid gain!"; exit 1; fi
if ! grep gain /etc/default/readsb &>/dev/null; then sudo sed -i -e 's/RECEIVER_OPTIONS="/RECEIVER_OPTIONS="--gain 49.6 /' /etc/default/readsb; fi
sudo sed -i -E -e "s/--gain[ =][^ \"]*/--gain $gain/" /etc/default/readsb
sudo systemctl restart readsb
echo "$gain" | sudo tee /run/readsb/setGain || sudo systemctl restart readsb
EOF
chmod a+x /usr/local/bin/readsb-gain

Expand Down

0 comments on commit e5bfd43

Please sign in to comment.