#!/bin/bash -v
#
# Install/Uninstall script for KlamAV
#

# Execution starts here
if [ "$1" = "" ]; then
	exit 1
fi

until [ -z "$1" ]  # Until all parameters used up...
do
  if [ "$URL" = "" ]; then
	URL=$1
	SCANTHIS=$1
  else
	URL=$URL'*'$1
	SCANTHIS=$SCANTHIS' '$1
  fi
  shift
done

if dcop `dcop|grep klamav|head -1` DCOPKlamscan scanURLs "$URL"; then
	exit 0
else
	klamav --scanthis $SCANTHIS
fi

