mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
Add FTLdownload() subroutine
This commit is contained in:
parent
7c63bbfe44
commit
52a2f166fd
1 changed files with 32 additions and 0 deletions
|
@ -1150,6 +1150,38 @@ if [[ "${reconfigure}" == true ]]; then
|
|||
fi
|
||||
}
|
||||
|
||||
FTLdownload() {
|
||||
|
||||
local machine=$(uname -m)
|
||||
|
||||
echo $machine
|
||||
|
||||
if [[ $machine == arm* ]]; then
|
||||
# ARM
|
||||
if [ -f "/lib/ld-linux-aarch64.so.1" ]; then
|
||||
echo "Detected ARM-aarch64 architecture"
|
||||
binary="pihole-FTL-aarch64-linux-gnu"
|
||||
elif [ -f "/lib/ld-linux-armhf.so.3" ]; then
|
||||
echo "Detected ARM-hf architecture"
|
||||
binary="pihole-FTL-arm-linux-gnueabihf"
|
||||
else
|
||||
echo "Detected ARM architecture"
|
||||
binary="pihole-FTL-arm-linux-gnueabi"
|
||||
fi
|
||||
elif [[ $machine == x86_64 ]]; then
|
||||
# 64bit
|
||||
echo "Detected x86_64 architecture"
|
||||
binary="pihole-FTL-linux-x86_64"
|
||||
else
|
||||
# Something else - we try to use 32bit executable and warn the user
|
||||
echo "Not able to detect architecture"
|
||||
binary="pihole-FTL-linux-x86_32"
|
||||
fi
|
||||
|
||||
curl -sSL "https://github.com/pi-hole/FTL/releases/latest/${binary}" -o "/etc/pihole/pihole-FTL"
|
||||
}
|
||||
|
||||
|
||||
main() {
|
||||
|
||||
######## FIRST CHECK ########
|
||||
|
|
Loading…
Reference in a new issue