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 07a20b3 commit 73700ac
Showing 1 changed file with 59 additions and 3 deletions.
62 changes: 59 additions & 3 deletions dump1090_status/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
# RUN AS SUDO

# Check services running
# Check Radarbox feeder
# Check Dump1090
if [systemctl is-active dump1090-fa.service -ne "active"]; then
#Wall
wall "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running, restarting services. Checked by: Method 1 - Systemctl detected dump1090 stopped"
wall "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running, restarting services. Checked by: Method 1 - Systemctl"

#Log
sudo echo "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running. Checked by: Method 1 - Systemctl detected dump1090 stopped" >> /var/log/dump1090_restart_log.txt
sudo echo "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running. Checked by: Method 1 - Systemctl" >> /var/log/dump1090_restart_log.txt

#Restarting Services
systemctl restart dump1090-fa.service
Expand All @@ -23,6 +23,62 @@ systemctl restart adsbexchange-feed.service
exit 1
fi

# Check Radarbox Feeder

if [systemctl is-active rbfeeder.service -ne "active"]; then
#Wall
wall "[$(date +"%d-%m-%Y %H:%M:%S")] Radarbox Feeder stopped running, restarting service. Checked by: Method 1 - Systemctl"

#Log
sudo echo "[$(date +"%d-%m-%Y %H:%M:%S")] Dump1090 stopped running. Checked by: Method 1 - Systemctl" >> /var/log/dump1090_restart_log.txt

#Restarting Services
systemctl restart rbfeeder.service

fi

# Check FlightRadar24 Feeder

if [systemctl is-active fr24feed.service -ne "active"]; then
#Wall
wall "[$(date +"%d-%m-%Y %H:%M:%S")] FlightRadar24 Feeder stopped running, restarting service. Checked by: Method 1 - Systemctl"

#Log
sudo echo "[$(date +"%d-%m-%Y %H:%M:%S")] FlightRadar24 stopped running. Checked by: Method 1 - Systemctl" >> /var/log/dump1090_restart_log.txt

#Restarting Services
systemctl restart fr24feed.service

fi

# Check Piaware Feeder

if [systemctl is-active piaware.service -ne "active"]; then
#Wall
wall "[$(date +"%d-%m-%Y %H:%M:%S")] PiAware Feeder stopped running, restarting service. Checked by: Method 1 - Systemctl"

#Log
sudo echo "[$(date +"%d-%m-%Y %H:%M:%S")] PiAware stopped running. Checked by: Method 1 - Systemctl" >> /var/log/dump1090_restart_log.txt

#Restarting Services
systemctl restart piaware.service

fi

# Check ADS-B Exchange Feeder

if [systemctl is-active adsbexchange-feed.service -ne "active"]; then
#Wall
wall "[$(date +"%d-%m-%Y %H:%M:%S")] ADS-B Exchange Feeder stopped running, restarting service. Checked by: Method 1 - Systemctl"

#Log
sudo echo "[$(date +"%d-%m-%Y %H:%M:%S")] ADS-B Exchange stopped running. Checked by: Method 1 - Systemctl" >> /var/log/dump1090_restart_log.txt

#Restarting Services
systemctl restart adsbexchange-feed.service

fi

# Check aircraft file exist
if [ ! -f /run/dump1090-fa/aircraft.json ]; then
#Wall
Expand Down

0 comments on commit 73700ac

Please sign in to comment.