NOC:ctwug updated

From CTWUG Wiki
Revision as of 12:11, 15 November 2012 by Johannes le Roux (talk | contribs) (Script)

Jump to: navigation, search

Purpose

Dependencies

Script

:local fid [/system identity get name]
:local fserial [/system routerboard get serial-number]
:local ffile "ctwug_version.rsc"       
:local fpath ("web/api/update?id=".$fid."&serial=".$fserial."&update=1")
:local fpath2 $fpath
:local fpath ""
:for i from=0 to=( [:len $fpath2] - 1) do={
  :local fchar [:pick $fpath2 $i]
  :if ( $fchar = " ") do={
    :set fchar "%20"
  }
  :set fpath ($fpath.$fchar)
}
       
/tool fetch host=noc.ctwug.za.net address=noc.ctwug.za.net src-path=$fpath dst-path=$ffile mode=http
:delay 1
:log info [/file get $ffile contents]

WMS

Wug Management System