From 353d36713bdeb8b94aa3850720f7abdf9a39a6a8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 18:32:04 -0400 Subject: [PATCH] Update config -R params --- config | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/config b/config index fcbd172b..60cd61d1 100755 --- a/config +++ b/config @@ -1025,14 +1025,19 @@ elif [ "$1" = "-R" ]; then echo "Reset the Commands Count in the file command_count.txt" echo - echo "Current commands count is:" - cat /home/pi/CubeSatSim/command_count.txt - echo + if [ -z "$param2" ] ; then - echo "Do you want to reset the commands count to zero (y/n) " - read reset - echo + echo "Current commands count is:" + cat /home/pi/CubeSatSim/command_count.txt + echo + echo "Do you want to reset the commands count to zero (y/n) " + read reset + echo + else + reset="$param2" + fi + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then sudo rm /home/pi/CubeSatSim/command_count.txt > /dev/null 2>&1 echo "Commands count reset to 0"