Added alert.ps1

This commit is contained in:
Markus Fleschutz 2020-11-11 21:10:35 +00:00
parent af115fc932
commit b42b1c1618

13
Scripts/alert.ps1 Executable file
View File

@ -0,0 +1,13 @@
#!/snap/bin/powershell
# Syntax: ./alert.ps1 <message>
# Description: sends the given alert message
# Author: Markus Fleschutz
# Source: github.com/fleschutz/PowerShell
# License: CC0
echo "ALERT"
curl --header "Access-Token: o.PZl5XCp6SBl4F5PpaNXGDfFpUJZKAlEb" --header "Content-Type: application/json" --data-binary '{"type": "note", "title": "ALERT", "body": "Intruder alert"}' --request POST https://api.pushbullet.com/v2/pushes
exit 0