mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-03-03 23:38:29 +00: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
002536ae09
commit
56ef68eaa1
1 changed files with 21 additions and 13 deletions
|
@ -145,6 +145,7 @@ EOM
|
||||||
# The runUnattended flag is one example of this
|
# The runUnattended flag is one example of this
|
||||||
reconfigure=false
|
reconfigure=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
|
||||||
|
@ -2422,6 +2423,9 @@ 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
|
||||||
|
# Allow the user to skip this check if they are using a self-compiled FTL binary from an unsupported architecture
|
||||||
|
if [ ! "${PIHOLE_SKIP_FTL_CHECK}" = true ]; then
|
||||||
|
# Get the binary name for the current architecture
|
||||||
local funcOutput
|
local funcOutput
|
||||||
funcOutput=$(get_binary_name) #Store output of get_binary_name here
|
funcOutput=$(get_binary_name) #Store output of get_binary_name here
|
||||||
# Abort early if this processor is not supported (get_binary_name returns empty string)
|
# Abort early if this processor is not supported (get_binary_name returns empty string)
|
||||||
|
@ -2429,6 +2433,7 @@ main() {
|
||||||
printf " %b Upgrade/install aborted\\n" "${CROSS}" "${DISTRO_NAME}"
|
printf " %b Upgrade/install aborted\\n" "${CROSS}" "${DISTRO_NAME}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# in case of an update (can be a v5 -> v6 or v6 -> v6 update)
|
# in case of an update (can be a v5 -> v6 or v6 -> v6 update)
|
||||||
if [[ -f "${PI_HOLE_V6_CONFIG}" ]] || [[ -f "/etc/pihole/setupVars.conf" ]]; then
|
if [[ -f "${PI_HOLE_V6_CONFIG}" ]] || [[ -f "/etc/pihole/setupVars.conf" ]]; then
|
||||||
|
@ -2476,6 +2481,8 @@ main() {
|
||||||
create_pihole_user
|
create_pihole_user
|
||||||
|
|
||||||
# Download and install FTL
|
# Download and install FTL
|
||||||
|
# Allow the user to skip this check if they are using a self-compiled FTL binary from an unsupported architecture
|
||||||
|
if [ ! "${PIHOLE_SKIP_FTL_CHECK}" = true ]; then
|
||||||
local binary
|
local binary
|
||||||
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)
|
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)
|
||||||
local theRest
|
local theRest
|
||||||
|
@ -2484,6 +2491,7 @@ main() {
|
||||||
printf " %b FTL Engine not installed\\n" "${CROSS}"
|
printf " %b FTL Engine not installed\\n" "${CROSS}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Install and log everything to a file
|
# Install and log everything to a file
|
||||||
installPihole | tee -a /proc/$$/fd/3
|
installPihole | tee -a /proc/$$/fd/3
|
||||||
|
|
Loading…
Add table
Reference in a new issue