Hello
I want to write a script that will run every 1 hours and check the IP I get and send me an E-mail if it’s change.
this is what I wrote so fat
my problem is how to save the old ip \where to put him
:global newip [/ip address get [find interface=ppp-out1] address];
:log warning "New IP is-$newip";
:if ($oldip !=$newip) do={:log warning "IP change to-$newip";
/system script run mail;
:global oldip=$newip; } else={:log warning "IP didn't change";:global oldip=$newip; };
:log warning "******script finish******";
Easiest place is in a comment field. In my experience, the best place is on the interface the DHCP server is running on (/interface etherX set comment=“1.2.3.4”) - that way it survives reboots and power cuts.
1 more question -
how can I see the IP as a link? so the person will press it and go directly to the IP
in the E-mail I see this as a text - and not as a link