From d45003a8ca4211474ca40a156c39332967ef8e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 5 May 2025 17:27:53 +0200 Subject: [PATCH] Do not try to upgrade gravity if it does not exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- automated install/basic-install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 2e1afe7b..ce240683 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2295,10 +2295,13 @@ main() { # but before starting or resttarting the ftl service disable_resolved_stublistener - # Check if gravity database needs to be upgraded. If so, do it without rebuilding - # gravity altogether. This may be a very long running task needlessly blocking - # the update process. - /opt/pihole/gravity.sh --upgrade + if [[ "${fresh_install}" == false ]]; then + # Check if gravity database needs to be upgraded. If so, do it without rebuilding + # gravity altogether. This may be a very long running task needlessly blocking + # the update process. + # Only do this on updates, not on fresh installs as the database does not exit yet + /opt/pihole/gravity.sh --upgrade + fi printf " %b Restarting services...\\n" "${INFO}" # Start services