Sanity Checking the Membership List

Once the list is downloaded, we sanity check it to make sure we don't do something drastic to our own membership database by mistake. (Sample scenario: We happen to grab the membership list while it's still being written to the EAA server, and therefore we only get half the file.)

  1. Has the file changed since the last time we downloaded it?
    • If not...
      • If it's been less than 36 hours (arbitrary!) since the last update, discard the file
      • If it's been more than 36 hours since the last update, send a warning email to the webmaster
      • Exit
    • Else the file has changed, so continue
  2. Verify that the file size is the same as the previous valid download, +/- 5% (arbitrary). If not, send a warning email and exit.
  3. Verify that the number of lines in the file is the same as the previous valid download, +/- 5%

Additional per-user verifications will take place in the next script - Updating the Membership List.