fresh pihole install (from scratch):
Pi-hole version is v5.11.4 (Latest: v5.11.4)
AdminLTE version is v5.13 (Latest: v5.13)
FTL version is v5.16.1 (Latest: v5.16.1)
/opt/pihole/updatecheck.sh: line 42: /etc/pihole/setupVars.conf: No such file or directory
I got the mail with the error message at 11:50:06, the install log (/etc/pihole/install.log) change time is 11:50:11, so I asume this is something that happens during installation.
As soon as I read the message, I checked, the file does exist.
also, running updatecheck.sh manually, doesn't give this error.
In gravity.sh, you use the following code:
if [[ -f "${setupVars}" ]];then
source "${setupVars}"
else
echo -e " ${COL_LIGHT_RED}Installation Failure: ${setupVars} does not exist! ${COL_NC}
Please run 'pihole -r', and choose the 'reconfigure' option to fix."
exit 1
fi
Might I ask the reason why you use a different approach in updatecheck.sh?
I think we could even remove sourcing setupVars.conf. It's only used to determine if the web interface has been installed during the installation. Instead, we could just check if /var/www/html/admin exists....
I came to the same conclusion as you did, this shouldn't be happening, and yet it did. It's a one of (no errors when running updatecheck later), but I thought it may be worth mentioning it, in case I missed something.