Raais / ewalert

Linux Earthquake Warning Alert - A simple bash script to notify major earthquakes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A simple bash script to notify major earthquakes from USGS. [What counts as a significant earthquake?]

Dependecies

Installation

Download bash script and make executable

curl 'https://raw.githubusercontent.com/Raais/ewalert/main/ewalert' -o $HOME/.local/bin/ewalert
sudo chmod +x $HOME/.local/bin/ewalert

Configuration

Uncomment the session="x-session" line according to your desktop environment. This is needed for exporting the DBUS_SESSION_BUS_ADDRESS variable.

Example (Ubuntu/GNOME)

### nano $HOME/.local/bin/ewalert ###
session="gnome-session"

Make script run every x minutes

Example (cron)

crontab -e
#run every 10 minutes
*/10 * * * * $HOME/.local/bin/ewalert

USGS Real-time GeoJSON Feeds are updated every minute, so you can choose any interval higher than that. The script will not repeat alerts.

You may face issues depending on your setup, eg., if you have notifications disabled, or if you have turned on Do Not Disturb mode.

About

Linux Earthquake Warning Alert - A simple bash script to notify major earthquakes

License:MIT License


Languages

Language:Shell 100.0%