From d47fc6681ec49b365f52c28e41c7aaa5238e37bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isaac=20Hern=C3=A1n?= <77550577+Isaaker@users.noreply.github.com> Date: Sun, 31 Dec 2023 14:46:07 +0100 Subject: [PATCH] Update script.sh --- dump1090_status/script.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dump1090_status/script.sh b/dump1090_status/script.sh index 0eb403e..1952251 100644 --- a/dump1090_status/script.sh +++ b/dump1090_status/script.sh @@ -3,14 +3,12 @@ # Font Code: https://github.com/Isaaker/isaaker-shell-scripts/new/main/dump1090_status # License: https://github.com/Isaaker/isaaker-shell-scripts/blob/main/LICENSE.txt -if ! jq '.aircraft | length > 0' /run/dump1090-fa/aircraft.json; -then - +if jq '.aircraft | length > 0' /run/dump1090-fa/aircraft.json; then #Wall wall "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 still running" #Log -echo "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 still running" > /var/log/dump1090_restart_log.txt +sudo echo "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 still running" > /var/log/dump1090_restart_log.txt else @@ -18,7 +16,7 @@ else wall "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running, restarting services" #Log -echo "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running" > /var/log/dump1090_restart_log.txt +sudo echo "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running" > /var/log/dump1090_restart_log.txt #Restarting Services systemctl restart dump1090-fa.service