Skip to content

Instantly share code, notes, and snippets.

@tguruslan
Created February 22, 2024 09:10
Show Gist options
  • Save tguruslan/85af83b12e799af3610149ae003d56a7 to your computer and use it in GitHub Desktop.
Save tguruslan/85af83b12e799af3610149ae003d56a7 to your computer and use it in GitHub Desktop.
mikrotik telegram send dhcp address
: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