Created
November 9, 2014 16:04
-
-
Save nigamankit7/a27e5f395d907a44942b to your computer and use it in GitHub Desktop.
When Raspberry Pi starts it will send it IP via PushBullet notification
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 | |
ipVar=$(/sbin/ifconfig $(netstat -nr | tail -1 | awk '{print $NF}') | awk -F: '/inet /{print $2}' | cut -f1 -d ' ') | |
curl https://api.pushbullet.com/v2/pushes \ | |
-u <API>: \ | |
-d device_iden="<ID>" \ | |
-d type="note" \ | |
-d title="Pi IP address" \ | |
-d body=$ipVar \ | |
-X POST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment