From 2ffb103acb064f7aa3f81bdb2723fbdb73bdcf9f Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Mon, 20 Feb 2017 15:32:02 -0800 Subject: [PATCH] Move binary to final home. Signed-off-by: Dan Schaper --- automated install/basic-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 5a0aae73..11ffbec2 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1153,7 +1153,7 @@ if [[ "${reconfigure}" == true ]]; then } FTLinstall() { - # Download and Install FTL binary + # Download and install FTL binary local binary="${1}" local latesttag local orig_dir @@ -1174,25 +1174,25 @@ FTLinstall() { cd /tmp if sha1sum --status --quiet -c "${binary}".sha1; then echo -n "transferred... " - install -m 0755 /tmp/pihole-FTL /usr/bin + install -T -m 0755 /tmp/${binary} /usr/bin/pihole-FTL touch /var/log/pihole-FTL.log /var/run/pihole-FTL.pid /var/run/pihole-FTL.port chmod 0666 /var/log/pihole-FTL.log /var/run/pihole-FTL.pid /var/run/pihole-FTL.port cd "${orig_dir}" + echo "done." return 0 else echo "failed (download of binary from Github failed)" cd "${orig_dir}" return 1 fi - cd "${orig_dir}" - echo "done." else + cd "${orig_dir}" echo "failed (URL not found.)" fi } FTLdetect() { - # Download suitable FTL binary + # Detect suitable FTL binary platform echo ":::" echo "::: Downloading latest version of FTL..." @@ -1236,7 +1236,7 @@ FTLdetect() { binary="pihole-FTL-linux-x86_32" fi - FTLinstall "${binary}" || return 1 + FTLdownload "${binary}" || return 1 }