#!/bin/bash
#
# run ghpsdr3-alex server:

. flProgs

PROG=hpsdr-server
LOG_PREFIX=~/ghpLogs
LOG=$LOG_PREFIX/ghpsdr3-alex.log
DEFAULT_SAMPLE_RATE=96000

cd ~
echo "Running" $PROG "from:" $GHPSDR3ALEX_PREFIX
### ", log: " $LOG > $LOG 2>&1

if [ $# -lt 2 ]
then
SAMPLE_RATE=$DEFAULT_SAMPLE_RATE
else
SAMPLE_RATE=$2
fi

# bug in alex requires "--hermes", should be "--metis"
$GHPSDR3ALEX_PREFIX/$PROG --receivers $1 --samplerate $SAMPLE_RATE --hermes 0 --interface eth0 --10mhzsource atlas --122.88mhzsource mercury
### --10mhzsource mercury 
### >> $LOG 2>&1 &

###tail -F $LOG
