diff --git a/virustotal.sh b/virustotal.sh index d29652d..40d3fa1 100644 --- a/virustotal.sh +++ b/virustotal.sh @@ -17,6 +17,9 @@ header=$(mktemp /tmp/virustotal.XXX.tmp) # Set to false if you want to keep the virus file. removeVirus=true +# Cleaning on exit. +trap "rm $report $header" EXIT SIGINT + apiReturn() { header=$1 @@ -64,6 +67,4 @@ else echo "No virus detected. Not adding a signature to Evolix database." fi -# Cleaning -rm "$report" exit 0