Created
August 30, 2020 06:30
-
-
Save refabr1k/d52f38692cb12701fb415a7f983ea54b to your computer and use it in GitHub Desktop.
Mikrotik get public IP and send to telegram bot
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
{ | |
/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path=mypublicip.txt | |
local ip [file get mypublicip.txt contents ] | |
put $ip | |
/tool fetch "https://api.telegram.org/<BOTAPI>/sendmessage\?chat_id=<CHATID>&text=Wan IP: $ip" keep-result=no; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment