mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-07-30 17:14:16 +02:00
Allow uses to skip binary check and installing FTL in case the use a self-compiled binary
Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
parent
0a36e9d949
commit
3f7f6f0294
@ -156,6 +156,7 @@ EOM
|
|||||||
# The runUnattended flag is one example of this
|
# The runUnattended flag is one example of this
|
||||||
repair=false
|
repair=false
|
||||||
runUnattended=false
|
runUnattended=false
|
||||||
|
PIHOLE_SKIP_FTL_CHECK=false
|
||||||
# Check arguments for the undocumented flags
|
# Check arguments for the undocumented flags
|
||||||
for var in "$@"; do
|
for var in "$@"; do
|
||||||
case "$var" in
|
case "$var" in
|
||||||
@ -2224,12 +2225,16 @@ main() {
|
|||||||
|
|
||||||
# Check if there is a usable FTL binary available on this architecture - do
|
# Check if there is a usable FTL binary available on this architecture - do
|
||||||
# this early on as FTL is a hard dependency for Pi-hole
|
# this early on as FTL is a hard dependency for Pi-hole
|
||||||
local funcOutput
|
# Allow the user to skip this check if they are using a self-compiled FTL binary from an unsupported architecture
|
||||||
funcOutput=$(get_binary_name) #Store output of get_binary_name here
|
if [ ! "${PIHOLE_SKIP_FTL_CHECK}" = true ]; then
|
||||||
# Abort early if this processor is not supported (get_binary_name returns empty string)
|
# Get the binary name for the current architecture
|
||||||
if [[ "${funcOutput}" == "" ]]; then
|
local funcOutput
|
||||||
printf " %b Upgrade/install aborted\\n" "${CROSS}" "${DISTRO_NAME}"
|
funcOutput=$(get_binary_name) #Store output of get_binary_name here
|
||||||
exit 1
|
# Abort early if this processor is not supported (get_binary_name returns empty string)
|
||||||
|
if [[ "${funcOutput}" == "" ]]; then
|
||||||
|
printf " %b Upgrade/install aborted\\n" "${CROSS}" "${DISTRO_NAME}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${fresh_install}" == false ]]; then
|
if [[ "${fresh_install}" == false ]]; then
|
||||||
@ -2271,13 +2276,16 @@ main() {
|
|||||||
create_pihole_user
|
create_pihole_user
|
||||||
|
|
||||||
# Download and install FTL
|
# Download and install FTL
|
||||||
local binary
|
# Allow the user to skip this check if they are using a self-compiled FTL binary from an unsupported architecture
|
||||||
binary="pihole-FTL${funcOutput##*pihole-FTL}" #binary name will be the last line of the output of get_binary_name (it always begins with pihole-FTL)
|
if [ ! "${PIHOLE_SKIP_FTL_CHECK}" = true ]; then
|
||||||
local theRest
|
local binary
|
||||||
theRest="${funcOutput%pihole-FTL*}" # Print the rest of get_binary_name's output to display (cut out from first instance of "pihole-FTL")
|
binary="pihole-FTL${funcOutput##*pihole-FTL}" #binary name will be the last line of the output of get_binary_name (it always begins with pihole-FTL)
|
||||||
if ! FTLdetect "${binary}" "${theRest}"; then
|
local theRest
|
||||||
printf " %b FTL Engine not installed\\n" "${CROSS}"
|
theRest="${funcOutput%pihole-FTL*}" # Print the rest of get_binary_name's output to display (cut out from first instance of "pihole-FTL")
|
||||||
exit 1
|
if ! FTLdetect "${binary}" "${theRest}"; then
|
||||||
|
printf " %b FTL Engine not installed\\n" "${CROSS}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install and log everything to a file
|
# Install and log everything to a file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user