$! DynDNS_VMS -- Dynamic DNS client for OpenVMS $! ACSakovich, 26-Oct-2004 $! D. Dachtera note: This proc. requires the freeware WGET program. $! $! Please send problem reports to aaron@openvms.org $! $ Version = "0.5" $! $! The following variables should be set to match your configuration. $! See the following URL for specific details regarding these values: $! https://www.dyndns.org/developers/specs/syntax.html $! $ Setup: $ UserName = "myuser" ! Your dyndns username $ Passwd = "mypass" ! Your account's password $ System = "dyndns" ! DYNDNS|STATDNS|CUSTOM $ Host = "hostname.dyndns.org"! Your hostname{,host2,...} $ Wildcard = "OFF" ! ON|OFF|NOCHG $ mx = "" ! MX hostname $ backmx = "NO" ! YES|NO $ offline = "NO" ! YES|NO $ ErrMail = "vmsuser" ! email address to receive error reports $ $! ======================================================================== $! You shouldn't have to change anything after this $! $! Note that there are some logicals that this program uses to $! manage updates. If these logicals don't exist, this program $! will create them as necessary, save for DynDNS$ForceUpdate, $! which should only be created if you want to do that. They are: $! $! Program generated: $! DynDNS$LastIP - the last IP recorded by DynDNS $! DynDNS$LastUpdate - date of last update $! User setable/resetable $! DynDNS$ForceUpdate - if True, an update is forced $! DynDNS$NoMoreUpdates - if True, severe error occured, and this $! program won't do any more updates without $! user intervention & resetting this logical $! $ agent = "--user-agent=""DynDNS_VMS/" + Version + """" $ if f$trnlnm("DynDNS$NoMoreUpdates") $ then $ mail nl: "''ErrMail'" /nosignature - /subject="DynDNS updates prohibited by logical DynDNS$NoMoreUpdates" $ exit $ endif $ $ DoUpd = "False" $ if f$trnlnm("DynDNS$ForceUpdate") $ then $ DoUpd = "True" $ define /system DynDNS$ForceUpdate "False" $ endif $ gosub GetCurrentIP $ if CurrentIP .nes. f$trnlnm("DynDNS$LastIP") then DoUpd = "True" $ if f$trnlnm("DynDNS$LastUpdate") .les. f$cvt("-25-",,"Date") then - DoUpd = "True" $ gosub ValidateIP $ if InvalidIP then DoUpd = "False" $ if DoUpd $ then $ gosub UpdateIP $ define /system DynDNS$LastIP "''CurrentIP'" $ endif $ Exit $! $! End of main code loop $! Subroutines follow............................................ $! $ GetCurrentIP: $ wget --output-document=ip.txt http://checkip.dyndns.org/ $ close/nolog IPfile $ open/read IPfile ip.txt $ read/end=NoIP IPfile ip $ close IPfile $ ip = f$edit(ip,"Collapse,LowerCase") $ start = f$locate("",ip) + 6 $ end = f$locate("