From e7e2fa6b2eec9965a24eab7c68386def52e7434f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 26 May 2021 10:45:27 -0400 Subject: [PATCH] adding mode change --- config.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config.sh b/config.sh index d786dcf9..fad9ba74 100755 --- a/config.sh +++ b/config.sh @@ -1,5 +1,31 @@ #!/bin/bash +if [ "$1" = "r" ]; then + echo "Restarting CubeSatSim" + sudo systemctl restart cubesatsim + exit +elif [ "$1" = "a" ]; then + echo "changing CubeSatSim to AFSK mode" + sudo echo "ARG1=a" >> .mode + sudo systemctl restart cubesatsim + exit +elif [ "$1" = "f" ]; then + echo "changing CubeSatSim to FSK mode" + sudo echo "ARG1=f" >> .mode + sudo systemctl restart cubesatsim + exit +elif [ "$1" = "b" ]; then + echo "changing CubeSatSim to BPSK mode" + sudo echo "ARG1=b" >> .mode + sudo systemctl restart cubesatsim + exit +elif [ "$1" = "s" ]; then + echo "changing CubeSatSim to SSTV mode" + sudo echo "ARG1=s" >> .mode + sudo systemctl restart cubesatsim + exit +fi + echo -e "\nConfiguration script for CubeSatSim\n" echo -e "Return keeps current value."