Using remote exploration ICAP service from Eset File Security for linux v8, I can handle virus detection for PMG using this code with some adjustment:
be sure to use
custom_check 1
in pmg.cfg
/usr/local/bin/pmg-custom-check
#!/bin/sh
if [ "$#" -ne 2 ]; then
echo "usage: $0 APIVERSION...