#! /bin/bash -xv # # NTT definition downloader # Downloads definitions from Symantec # Extracts them from properiatary container (RAR that checks for Symantec product install) # Copies them to the webserver directory for download # Designed to be scheduled and run by cron # Move to a proper directory cd /tmp # Download NTT defs wget "http://definitions.symantec.com/defs/symcdefsv5i32.exe" # Extract defs from download unrar x ./symcdefsv5i32.exe VIRSCAN.ZIP ./defs/ # Remove previous VIRSCAN.ZIP from webserver directory rm /var/www/defs/VIRSCAN.ZIP # Copy new defs over for download cp ./defs/VIRSCAN.ZIP /var/www/defs/VIRSCAN.ZIP # Clean up temp directory rm ./symcdefsv5i32.exe rm -rf ./defs if [ $? -eq 0 ] then echo "Done" else echo $? fi exit 0