|
发表于 2012-3-12 01:22:13
|
显示全部楼层
/system scheduler
add comment="3322\B6\AF\CC\AC\D3\F2\C3\FB" disabled=no interval=10m name=\
3322DNS on-event=":local ednsuser \"username\"\r\
\n:local ednspass \"userpassword\"\r\
\n:local ednshost \"username.3322.org\"\r\
\n:local ednsinterface \"pppoe-out1\"\r\
\n:local members \"http://members.3322.org/dyndns/update\?system=dyndns\"\
\r\
\n#:local members \"http://members.dyndns.org/nic/update\?\"\r\
\n:local status\r\
\n:local status [/interface get [/interface find name=\$ednsinterface] ru\
nning]\r\
\n:if (\$status!=false) do={\r\
\n:local ednslastip [:resolve \$ednshost]\r\
\n:if ([ :typeof \$ednslastip ] = nil ) do={ :local ednslastip \"0\" }\r\
\n:local ednsiph [ /ip address get [/ip address find interface=\$ednsinter\
face ] address ]\r\
\n:local ednsip [:pick \$ednsiph 0 [:find \$ednsiph \"/\"]]\r\
\n:local ednsstr \"&hostname=\$ednshost&myip=\$ednsip\"\r\
\n:if (\$ednslastip != \$ednsip) do={/tool fetch url=(\$members . \$ednsst\
r) mode=http user=\$ednsuser password=\$ednspass dst-path=\$ednshost\r\
\n:delay 2\r\
\n:local result [/file get \$ednshost contents]\r\
\n:log info (\$ednshost . \" \" .\$result)\r\
\n/file remove \$ednshost ;\r\
\n}\r\
\n}\r\
\n" policy=reboot,read,write,policy,test,sniff,sensitive start-date=\
jan/01/1970 start-time=00:00:00
|
|