Pi-hole as part of a post-installation script

just to verify: you also created a file /etc/pihole/setupVars.conf and configured it using these values?