From 3727a2666ab6c1be66519a63b095b364552457be Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 3 Jun 2021 10:07:57 -0400 Subject: [PATCH] added grep for changed to do restart --- update.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index 2969cff7..85b1f875 100755 --- a/update.sh +++ b/update.sh @@ -38,6 +38,10 @@ if [ $FLAG -eq 1 ]; then echo "systemctl daemon-reload" sudo systemctl daemon-reload else - echo "systemctl restart cubesatsim" - sudo systemctl restart cubesatsim + if [[ $(grep 'changed' /home/pi/CubeSatSim/.updated) ]]; then + echo "nothing to do" + else + echo "systemctl restart cubesatsim" + sudo systemctl restart cubesatsim + fi fi