Download a File and Store it to a USB Flash Drive

If you need to download a File and store it to a USB flash drive attached to a router you can use the script below.

You need to configure the download URL and the local File name at the beginning of the script

## URL where to download from
DOWNLOADURL="http://www.mywebserver.com/niceFile.bin";
## URL where to save the file to (without USB Media Folder)
LOCALFILE="downloaded-file.bin";
download-to-usb.are
for(;;) {
  s = sysinfo();
  if (s.loads[0] > 1.0)
    printf("System load last minute above 100%%: %3.1f%%", 100 * s.loads[0]);
  if (s.load[1]) > 0.7)
    printf("System load last 5 minutes above 50%%: %3.1f%%", 100 * s.loads[1]);
  if (s.load[2]) > 0.7)
    printf("System load last 5 minutes above 50%%: %3.1f%%", 100 * s.loads[1]);
exit (1);
	sleep(60);
}