acidrain
Executive Member
- Joined
- Jan 7, 2007
- Messages
- 5,975
Hi guys,
Ok im trying to load the following script but I seem to get and error on my "/tool fetch" line.
The code:
I did edit the variables with my details so I know about that.
Now the error:
Help please! The updater on my pc doesn't update quick enough
Ok im trying to load the following script but I seem to get and error on my "/tool fetch" line.
The code:
Code:
/system script add name=DynDNS policy=read,test source={
# Define User Variables
:global ddnsuser "user"
:global ddnspass "pass"
:global ddnshost "host"
# Define Global Variables
:global ddnsip
:global ddnslastip
:if ([:typeof $ddnslastip] = nil) do={ :global ddnslastip "0.0.0.0/0" }
:global ddnsinterface
:global ddnssystem ("mt-" . [/system package get system version])
# Define Local Variables
:local int
# Loop thru interfaces and look for ones containing
# default gateways without routing-marks
:foreach int in=[/ip route find dst-address=0.0.0.0/0 active=yes] do={
:if ([:typeof [/ip route get $int routing-mark]] != str) do={
:global ddnsinterface [/ip route get $int interface]
}
}
# Grab the current IP address on that interface.
:global ddnsip [/ip address get [/ip address find interface=$ddnsinterface] address]
# Did we get an IP address to compare
:if ([:typeof $ddnsip] = nil) do={
:log info ("DynDNS: No ip address present on " . $ddnsinterface . ", please check.")
} else={
:if ($ddnsip != $ddnslastip) do={
:log info "DynDNS: Sending IP:$ddnsip UPDATE!"
/tool fetch keep-result=no url="http://$ddnsuser:$ddnspass@204.13.248.112/nic/update\?hostname=$ddnshost"
:global ddnslastip $ddnsip
# } else={
# :log info "DDNS: No update required."
}
}
}
I did edit the variables with my details so I know about that.
Now the error:
Code:
{{{... /tool fetch keep-result=no url="http://$ddnsuser:$ddnspass@dyndns.com
/nic/update\?hostname=$ddnshost"
bad argument name url (line 37 column 32)
Help please! The updater on my pc doesn't update quick enough