Hello,
We have several devices that may or may not be on at a given time. I'd like to write a script that will fetch any new updates that we'd like to make, with some reporting and basic error recovery in place. sometimes a device may have missed a previous update, so I'd like to be able to assure that all devices get all updates when they do come online. We will write a new .auto.rsc file for each change we'd like to implement, which could be anything from changing NTP servers to doing full code upgrades. Also, I'd like to be sure a device doesn't repeatedly try to apply the same update over and over again - if it succeeded in doing the update once, it shouldn't need to try again every hour/day/startup just because the file exists.
Here's what I'm trying to accomplish. any help is greatly appreciated, or any better ideas of course
files on ftp site named like: UPDATE2010081201.auto.rsc #first change file for Aug 12, 2010
#each update file will be written to the local device as well as executed - maybe there's a better way to track successful updates?
#if it's 3PM or if we just booted, we should run
#check that we have good connection to ftp server; if not then write timestamp & CONNECT FAIL to local log file and exit
#if any local files aren't on server any more, remove them from the device. write each action to local log file
#if any new files on server that I don't have, copy them to me and process their contents. write each action to local log file
#write to local log file the status of checkin (nothing new but I tried, I processed this file, etc)
#send contents of the local log file to central log server via syslog (one message per line?)
#clear local log file
#retry every hour until successful, then go back to every 24 hour|on startup schedule
##if CONNECT FAIL exists in local log, we should run hourly
Thanks!!
Shaun