added in groundstation/.profile setting but don't do anything with it yet.

pull/101/head
alanbjohnston 5 years ago committed by GitHub
parent 4a1e886d84
commit 399ac618f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,10 +1,52 @@
#!/bin/bash #!/bin/bash
# script to run FoxTelem # script to run FoxTelem
echo "Script to run FoxTelem for ARISS Radio Pi" echo "Startup script to run FoxTelem for ARISS Radio Pi"
echo echo
FILE=/home/pi/CubeSatSim/groundstation/.profile
if [ ! -f "$FILE" ]; then
echo "You need to choose your default FoxTelem profile."
echo
echo "The choices are:"
echo
echo "1. Fox-in-a-Box. Use this profile if you want to receive and decode telemetry from the AMSAT Fox satellites. If you enter a callsign and a grid square, you can upload to the AMSAT telemetry server."
echo
echo "2. CubeSatSim Ground Station. Use this profile if you want to receive and decode telemetry from an AMSAT CubeSatSim or CubeSatSim Lite."
echo
echo "Which profile do choose? Enter 1 or 2"
read -r ANS
if [ "$ANS" = "1" ]; then
echo "You have chosen the Fox-in-a-Box profile."
echo "b" > /home/pi/CubeSatSim/groundstation/.profile
elif [ "$ANS" = "2" ]; then
echo "You have chosen the CubeSatSim Ground Station profile."
echo "c" > /home/pi/CubeSatSim/groundstation/.profile
else
echo "Please enter only 1 or 2"
fi
else
value=`cat /home/pi/CubeSatSim/groundstation/.profile`
echo "$value" > /dev/null
set -- $value
if [ "$1" = "b" ]; then
echo "Fox-in-a-box profile is set!"
elif [ "$1" = "c" ]; then
echo "CubeSatSim Ground Station profile is set!"
fi
sudo killall -9 foxtelem &>/dev/null sudo killall -9 foxtelem &>/dev/null

Loading…
Cancel
Save

Powered by TurnKey Linux.