Only run migration code if setupVars.conf exists. (#5969)

This commit is contained in:
Adam Warner 2025-02-22 20:30:46 +00:00 committed by GitHub
commit da4048ba5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -2312,8 +2312,8 @@ migrate_dnsmasq_configs() {
# avoid conflicts with other services on this system
# Exit early if this is already Pi-hole v6.0
# We decide this on the presence of the file /etc/pihole/pihole.toml
if [[ -f "${PI_HOLE_V6_CONFIG}" ]]; then
# We decide this on the non-existence of the file /etc/pihole/setupVars.conf (either moved by previous migration or fresh install)
if [[ ! -f "/etc/pihole/setupVars.conf" ]]; then
return 0
fi