Created
February 22, 2024 09:10
-
-
Save tguruslan/85af83b12e799af3610149ae003d56a7 to your computer and use it in GitHub Desktop.
mikrotik telegram send dhcp address
This file contains 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
:global botToken "" | |
:global chatId "" | |
:global interfaceName "ether1" | |
while ([/ping 8.8.8.8 interval=3 count=1]=0) do={ | |
delay 5 | |
}; | |
/tool fetch url=("https://api.telegram.org/bot".$botToken."/sendMessage\?chat_id=".$chatId."&text=#".[/system identity get name]."+".[/ip address get [find interface=$interfaceName] address]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment