From 34d9409f236b5983c4b79cb24fe001b63735cb92 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 13 Aug 2023 12:13:58 -0400 Subject: [PATCH] Update update to creat command files if not present --- update | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/update b/update index 9e6134c3..26dbc8aa 100755 --- a/update +++ b/update @@ -28,6 +28,22 @@ git pull > .updated make debug +FILE=/home/pi/CubeSatSim/command_tx +if [ -f "$FILE" ]; then + echo "$FILE exists." +else + echo "creating $FILE" + echo "True\n" > /home/pi/CubeSatSim/command_tx +fi + +FILE=/home/pi/CubeSatSim/command_count.txt +if [ -f "$FILE" ]; then + echo "$FILE exists." +else + echo "creating $FILE" + echo "0\n" > /home/pi/CubeSatSim/command_count.txt +fi + FLAG=0 if [[ $(diff systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then