From 98dc0ad3b00687cc4bff2f667b6842affb5a094b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 21 Jul 2024 10:33:18 -0400 Subject: [PATCH] Update config reverting - only restart on all mode changes --- config | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/config b/config index be65667f..dbbc2658 100755 --- a/config +++ b/config @@ -365,8 +365,7 @@ elif [ "$1" = "-a" ]; then echo "changing CubeSatSim to AFSK mode" sudo echo "a" > /home/pi/CubeSatSim/.mode -# if [ "$1" == "f" ] || [ "$1" == "b" ] ; then - if [ "$1" == "f" ] ; then + if [ "$1" == "f" ] || [ "$1" == "b" ] ; then # restart=1 reboot=1 else @@ -388,10 +387,9 @@ elif [ "$1" = "-m" ]; then echo "changing CubeSatSim to CW mode" sudo echo "m" > /home/pi/CubeSatSim/.mode -# if [ "$1" == "f" ] || [ "$1" == "b" ] ; then - if [ "$1" == "f" ] ; then - reboot=1 -# restart=1 + if [ "$1" == "f" ] || [ "$1" == "b" ] ; then +# reboot=1 + restart=1 else restart=1 fi @@ -1408,5 +1406,3 @@ if [ "$restart" = "1" ] ; then echo "Restart needed for changes to take effect" fi fi - -