initial implementation

This commit is contained in:
2025-10-28 20:01:44 -04:00
commit b734b8b821
4 changed files with 33 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
goes_magnetometer_check

15
Makefile Normal file
View File

@@ -0,0 +1,15 @@
GOPATH=/home/${USER}/go/bin
goes_magnetometer_check:
echo "PATH=/usr/local/bin:/usr/bin" > $@;
echo "* * * * * ${USER} /usr/local/bin/goes_check_and_notify" >> $@;
${GOPATH}/go-sendxmpp:
# https://salsa.debian.org/mdosch/go-sendxmpp
go install salsa.debian.org/mdosch/go-sendxmpp@latest
install: goes_magnetometer_check ${GOPATH}/go-sendxmpp
sudo install -m 0644 goes_magnetometer_check /etc/cron.d/goes_magnetometer_check;
sudo install -m 0755 goes_check_and_notify.sh /usr/local/bin/goes_check_and_notify;
sudo install -m 0755 ${GOPATH}/go-sendxmpp /usr/local/bin/go-sendxmpp;

12
README.md Normal file
View File

@@ -0,0 +1,12 @@
# goes_magnetowatcher
... watches the GOES 19 magnetometer and pings Martin if sometihng interesting is happening.
## prerequisites
```sh
sudo dnf install -y golang-bin jq make
```
## conf file
```sh

5
goes_check_and_notify.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
if false; then
echo "hello bob!" | go-sendxmpp hurricos@jabber.at
fi