Try and :
- cd to the root folder of that repo
- specify the work-tree and git directory for that folder when doing the git command.
That would give in your post-receive hook script:
cd /var/www/
git --git-dir=/var/www/.git --work-tree=/var/www submodule update --init --recursive