Advertisement
dreamonx

sylph-clamassassin-wrapper.sh

Jan 12th, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.28 KB | None | 0 0
  1. #!/bin/sh
  2. if [ $# -eq 1 ]
  3. then
  4.   RESULT=$(clamassassin < $1 | grep "X-Virus-Status")
  5.   if [ "$RESULT" = "X-Virus-Status: Yes" ]
  6.   then
  7.     zenity --warning --title="Threat detected" --text="Clamassassin has detected a threat in file\n$1\n$RESULT"
  8.     exec true
  9.   fi
  10. fi
  11. exec false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement