/* DESC: The Router will try to download a config file from a ftp server with a unique part in the URL. * DESC: After the File was downloaded successfully it will be deleted on the remote ftp server * Copyright (C) 2017 JJ NetModule AG, Switzerland */ // ftp/http/ftps/https is possible here url="ftp://myfileserver.ch/"; user="ftpusername"; pw="ftppassword"; // Get Unique Part of the URL via Serial Number or Hostname //unique=nb_status("info").SERIAL_NUMBER; unique=nb_config_get("network.hostname"); // File name on the server image="cfg.zip"; // local file for storage local="configfile.zip"; //We will have a remote update Link like: ftp://myfileserver.ch/myhostname/cfg.zip link=sprintf("%s/%s/%s",url,unique,image); DELAY=120; TRIES=5; for (i=0;i