I have been trying to automate the setup process for pi hole on a raspberry pi. I am relatively new to bash and am unable to figure out how to automate the setup process once the terminal gui for the program begins.

this is what I have so far
#!/bin/bash
pihole -r
echo "waited"
$SHELL
So I reiterate back to my question, how do I automate the task of choosing and entering the option in the terminal gui of the pihole program? Any help would be greatly appreciated.