#! /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 directorycd /tmp# Download NTT defswget "http://definitions.symantec.com/defs/symcdefsv5i32.exe"# Extract defs from downloadunrar x ./symcdefsv5i32.exe VIRSCAN.ZIP ./defs/# Remove previous VIRSCAN.ZIP from webserver directoryrm /var/www/defs/VIRSCAN.ZIP# Copy new defs over for downloadcp ./defs/VIRSCAN.ZIP /var/www/defs/VIRSCAN.ZIP# Clean up temp directoryrm ./symcdefsv5i32.exerm -rf ./defsif [ $? -eq 0 ]then echo "Done"else echo $?fiexit 0