From 9252e90bd625edab6fdbcaa9e1225610331f86a1 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 25 Jul 2025 21:54:54 +0100 Subject: [PATCH] Check for the existence of the FTL binary before stopping the service This prevents errors on fresh installs where the FTL binary does not exist yet. Signed-off-by: Adam Warner --- automated install/basic-install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 5c4a84c0..e85b4ff1 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1794,8 +1794,12 @@ FTLinstall() { # Before stopping FTL, we download the macvendor database curl -sSL "https://ftl.pi-hole.net/macvendor.db" -o "${PI_HOLE_CONFIG_DIR}/macvendor.db" || true - # Stop pihole-FTL service if available - stop_service pihole-FTL >/dev/null + + # If the binary already exists in /usr/bin, then we need to stop the service + # If the binary does not exist, then we can skip this step. + if [[ -f /usr/bin/pihole-FTL ]]; then + stop_service pihole-FTL >/dev/null + fi # Install the new version with the correct permissions install -T -m 0755 "${binary}" /usr/bin/pihole-FTL