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