Commit 47a8deea authored by yids's avatar yids

allow specifying bind address on init.sh command line

parent 5c11083b
#!/bin/bash
if [ $# -ne 3 ]; then
echo "Usage: $0 device rate ppm"
if [ $# -ne 4 ]; then
echo "Usage: $0 device rate ppm listen-address"
exit 2
fi
......@@ -9,13 +9,15 @@ sdr="/tmp/sdrpipe"
tune="/tmp/tunepipe"
gain="30"
ppm="$3"
sample_rate="$2"
listen_address="$4"
freq="$(( 100 * 1000 * 1000 ))"
[ ! -p "$sdr" ] && mkfifo "$sdr"
[ ! -p "$tune" ] && mkfifo "$tune"
# set -b :: for ipv4 and ipv6 all interfaces
./server -s 2048000 -p "$ppm" -f "$freq" -i "$tune" -o "$sdr" -f "$freq" -g "$gain" -a -s "$2" -b 127.0.0.1 -t 4444 -w 1024 &
./server -p "$ppm" -f "$freq" -i "$tune" -o "$sdr" -f "$freq" -g "$gain" -a -s "$sample_rate" -b "$listen_address" -t 4444 -w 1024 &
spid=$!
echo "Server PID $spid, use 'gdb ./server $spid -ex c' to debug"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment