脚本高手帮忙修改一个脚本.谢谢
:global gate gateway]:global xxddns {:put interface]}
:global ddnsuser "用户账号"
:global ddnspass "用户密码"
:global ddnshost1 "绑定域名1"
:global ddnshost2 "绑定域名2"
:global ddnshost3 "绑定域名3"
:global ddnsinterface $xxddns
:global ddnslastip
:global ddnsip [ /ip address get address ]
:if ( [:typeof $ddnslastip]="nothing" ) do={ :global ddnslastip 0.0.0.0/0 }
:if ( [:typeof $ddnsip]="nothing" ) do={
:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")
} else={
:if ($ddnsip != $ddnslastip) do={
:log info "DDNS: Sending UPDATE!"
:log info [ /tool dns-update name=$ddnshost1 address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ]
:log info [ /tool dns-update name=$ddnshost2 address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ]
:log info [ /tool dns-update name=$ddnshost3 address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ]
:global ddnslastip $ddnsip
} else={
:log info "DDNS: No change"
}
}
:log info "DDNS: End"哪位高手帮忙修改一下能让这脚本在2.9X上用.
{
#axiang qq47771885
:local Ipaddress ""
:local pname ""
/interface pppoe-client
:for ii from 1 to 4 do={
:set pname ("pppoe-out". $ii)
monitor $pname once do={
:if ($status="connected" && $uptime<00:30:00) do={
:set Ipaddress address]
:set Ipaddress [:pick $Ipaddress 0 [:find $Ipaddress "/"]]
/tool dns-update name=("aaaa". $ii . ".xx.com") address=$Ipaddress key-name=aaaa key=bbbb
}}}}适当修改
页:
[1]