Add switching 'to...from' message to ftl checkout output (#4266)

* Add switching 'to...from' message to ftl checkout output

Signed-off-by: Christian König <ckoenig@posteo.de>

* Add quotes

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
yubiuser 2021-08-07 20:07:45 +02:00 committed by GitHub
parent bb7c7cdf33
commit ee749f700f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -166,12 +166,15 @@ checkout() {
checkout_pull_branch "${webInterfaceDir}" "${2}"
elif [[ "${1}" == "ftl" ]] ; then
local path
local oldbranch
path="${2}/${binary}"
oldbranch="$(pihole-FTL -b)"
if check_download_exists "$path"; then
echo " ${TICK} Branch ${2} exists"
echo "${2}" > /etc/pihole/ftlbranch
chmod 644 /etc/pihole/ftlbranch
echo -e " ${INFO} Switching to branch: \"${2}\" from \"${oldbranch}\""
FTLinstall "${binary}"
restart_service pihole-FTL
enable_service pihole-FTL