Created
June 22, 2017 14:16
-
-
Save FelipeGrijo/3c437755768c54e771d129540e5f2d5f to your computer and use it in GitHub Desktop.
Verifica constantemente um arquivo, e envia um alerta via Pushbullet caso tenho sido alterado.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#sudo apt install inotify-tools | |
#Envia um alerta no PushBullet quando o arquivo for alterado | |
#https://gist.github.com/FelipeGrijo | |
while inotifywait -q -e modify LOCAL-DO-ARQUIVO >/dev/null; | |
do | |
API="SUA-API" | |
MSG="$1" | |
Title="Arquivo-Sincronizado" | |
curl -u $API: https://api.pushbullet.com/v2/pushes -d type=note -d title="$Title" -d body="$MSG" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment