tmd 发表于 2012-2-22 19:57:51

求ROS 3.30下DDNS能用的脚本?

求那位能给个ROS 3.30下DDNS能用的脚本?我试了好多都不行,但在2.927下能用,求高人

andykwok 发表于 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 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 \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
页: [1]
查看完整版本: 求ROS 3.30下DDNS能用的脚本?