actually add nma script to git
This commit is contained in:
parent
ed9de97c72
commit
4115900dce
1 changed files with 16 additions and 0 deletions
16
lib/bin/nma
Executable file
16
lib/bin/nma
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
out=$(mktemp /tmp/nma.XXXXXXXX)
|
||||||
|
|
||||||
|
curl --silent --data-ascii "apikey=1e9cfe3bddab21f271b742eb04f9918a76ad0ef0333be7d3" \
|
||||||
|
--data-ascii "application=Server" --data-ascii "event=megumi.eeleater.org" \
|
||||||
|
--data-asci "description=$1" --data-asci "priority=0" \
|
||||||
|
"https://www.notifymyandroid.com/publicapi/notify" -o "$out"
|
||||||
|
|
||||||
|
if test $(xml sel -t -m "nma/success" -v "@code" "$out") == "200"; then
|
||||||
|
echo "Sent"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Not sent: $(xml sel -t -m "nma/error" -v "." "$out")"
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue