Skip to content

Commit

Permalink
Merge branch 'wiedehopf:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
rkarikari authored Nov 10, 2024
2 parents 6157b2f + e5bfd43 commit fab7688
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions inotify-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if ! command -v inotifywait || ! command -v s6wrap; then
fi

pkill inotifywait || true
rm -f /run/inotify.log

echo 192000 > /proc/sys/fs/inotify/max_user_watches
s6wrap --timestamps --args inotifywait -r -m /etc /opt /root /home /usr /lib /boot /var \
Expand Down
8 changes: 4 additions & 4 deletions readsb-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ systemctl restart readsb || true
mkdir -p /usr/local/bin
cat >/usr/local/bin/readsb-gain <<"EOF"
#!/bin/bash
validre='^(-10|[0-9]+([.][0-9]+)?)$'
gain=$(echo $1 | tr -cd '[:digit:].-')
validre='^([^ ]*)$'
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 .?[0-9]*.?[0-9]* /--gain $gain /" /etc/default/readsb
sudo systemctl restart readsb
sudo sed -i -E -e "s/--gain[ =][^ \"]*/--gain $gain/" /etc/default/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 fab7688

Please sign in to comment.