It depends on how you are installing grub. And of course, if you are installing it on the EFI System Partition (ESP), then it depends on where you are mounting that. In the particular case of your script, it looks as though perhaps it is expecting the ESP to be mounted on /boot/efi, and the /EFI/redhat directory is set up to contain what would ordinarily be in /boot on a BIOS based system. If this is correct, just take the location of grub2.conf on a BIOS system and replace the /boot prefix with /boot/efi/EFI/redhat, and you have your answer, namely /boot/efi/EFI/redhat/grub2/grub2.conf. (Note that /etc/default/grub will not move, because that is only used to generate the grub configuration and not used at boot time.)
There are at least two other common ways of setting up your ESP. One is to mount the ESP directly on /boot. The advantage is that you can then install things like grub and the kernel without worrying about the BIOS/UEFI distinction. The disadvantage is that you are now polluting the root directory of your ESP (which in theory is OS-independent) with all kinds of linux-specific files, like the kernel, whereas it would be tidier to stick all of those in one place like under /EFI/redhat.
The approach I favor (and this is just my opinion), is to mount your ESP on its own directory (/esp), and then bind-mount a subdirectory of your ESP onto /boot. So then you get the advantage of a tidy ESP and the advantage of existing tools finding what they want in /boot. The disadvantages are a slightly more complicated fstab and the fact that you cannot have symbolic links in /boot (a FAT file system). Here is a snippet of an /etc/fstab file on a machine with this setup:
/dev/sda2 /esp vfat rw,nosuid,nodev,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
/esp/EFI/redhat /boot none rw,nosuid,nodev,bind 0 0
grub
.grub
is a bootloader, and, as such, doesn't make sense on a UEFI system, which has no need for such MBR-specific hacks. – mikeserv Jul 22 '15 at 20:46