Skip to content

Commit

Permalink
Update script.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaaker authored Jan 1, 2024
1 parent f5913d7 commit 48b571c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dump1090_status/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

# Check services running
# Check Radarbox feeder
#systemctl is-active dump1090-fa.service
if systemctl is-active dump1090-fa.service

# Check aircraft file exist
if [ ! -f /run/dump1090-fa/aircraft.json ]; then
#Wall
wall "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running, restarting services"
wall "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running, restarting services. Checked by: Method 2 - /run/dump1090-fa/aircraft.json file didn't exist"

#Log
sudo 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. Checked by: Method 2 - /run/dump1090-fa/aircraft.json file didn't exist" >> /var/log/dump1090_restart_log.txt

#Restarting Services
systemctl restart dump1090-fa.service
Expand Down

0 comments on commit 48b571c

Please sign in to comment.