/opt/pihole/updatecheck.sh: line 42: /etc/pihole/setupVars.conf: No such file or directory

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

lines 40 to 42:

# Source the setupvars config file
# shellcheck disable=SC1091
. /etc/pihole/setupVars.conf

When do you see this message? During installation? Does the file exist?

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}"
  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

Might I ask the reason why you use a different approach in updatecheck.sh?

Probably no good reason.

To implement the check is easy - the question is why is it failing in the first place?

updatecheck is called during installation here:

However, setupVars.conf is written earlier:

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.

Feel free to close this topic.

good idea ...

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.