Initial load

This commit is contained in:
Eric Loyd
2026-09-06 12:08:05 -04:00
commit 3c8d0674ef
25 changed files with 1763 additions and 0 deletions
Executable
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# check_iss.sh
API="http://api.open-notify.org/iss-now.json"
# Query the public ISS live API
DATA=$(curl --connect-timeout 5 --max-time 15 -s "$API")
if [ "$?" -gt 0 ]; then
echo "UNKNOWN - $API returned no data or serious error: $DATA"
exit 3
fi
if [ $(echo "$DATA" | jq -r '.message') != "success" ]; then
echo "UNKNOWN - $API timed out"
exit 3
fi
# Extract coordinates
echo $DATA | jq -r '.iss_position | .latitude + " " + .longitude' | \
(read LAT LON; \
echo "OK - ISS Location: Lat $LAT, Lon $LON | ISS_lat=$LAT;;;; ISS_lon=$LON;;;;")
exit 0