diff --git a/Dockerfile b/Dockerfile index a6aac3a..05a23e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,8 @@ ENV DEVICE_INDEX="" \ FREQUENCIES="" \ FEED_ID="" \ PPM="0"\ - GAIN="40" \ + GAIN_TYPE="" \ + GAIN="" \ SERIAL="" \ SOAPYSDR="" \ SERVER_PORT="5556" \ diff --git a/rootfs/etc/s6-overlay/scripts/01-dumphfdl.sh b/rootfs/etc/s6-overlay/scripts/01-dumphfdl.sh index c6ce099..f05cce4 100755 --- a/rootfs/etc/s6-overlay/scripts/01-dumphfdl.sh +++ b/rootfs/etc/s6-overlay/scripts/01-dumphfdl.sh @@ -16,15 +16,14 @@ if [[ -z "$SOAPYSAMPLERATE" ]]; then exit 1 fi -# if [[ -z "$GAIN" ]]; then -# "${s6wrap[@]}" echo "GAIN is not set, exiting" -# exit 1 -# fi - -# if [[ -z "$GAIN_TYPE" ]]; then -# "${s6wrap[@]}" echo "GAIN_TYPE is not set, exiting" -# exit 1 -# fi +if [[ -n "$GAIN" ]]; then + if [[ -z "$GAIN_TYPE" ]]; then + "${s6wrap[@]}" echo "GAIN_TYPE is not set with GAIN being set. Please see documentation. Exiting" + exit 1 + fi +fi + + if [[ -z "$SOAPYSDRDRIVER" ]]; then "${s6wrap[@]}" echo "SOAPYSDRDRIVER is not set, exiting"