Created
February 22, 2024 09:04
-
-
Save tguruslan/01e2a4f4c5d3f5d78debc9fcbe13c14c to your computer and use it in GitHub Desktop.
mikrotik discord 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 discordWebhookUrl "https://discordapp.com/api/webhooks/..." | |
:global interfaceName "ether1" | |
:while ([/ping 8.8.8.8 interval=3 count=1] = 0) do={ | |
:delay 5 | |
} | |
/tool fetch url=($discordWebhookUrl . "?wait=true") http-method=post http-data=("content=" . "#".[/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