initial implementation
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
goes_magnetometer_check
|
||||||
15
Makefile
Normal file
15
Makefile
Normal 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
12
README.md
Normal 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
5
goes_check_and_notify.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if false; then
|
||||||
|
echo "hello bob!" | go-sendxmpp hurricos@jabber.at
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user