#!/bin/bash
# wrapper for clamdscan to force the --fdpass parameter to avoir failure because of 
# no permission to access
allargs=$@
toadd=" --fdpass "
#parse args
while [ "$#" -gt 0 ]; do
        case "$1" in
            --fdpass) toadd=""  ;;
            --stream) toadd=""   ;;
        esac
        shift
done


#we return to systemd systemctl command unless this is one of the command we want to handle
/usr/bin/clamdscan $toadd ${allargs[*]}

