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

View file

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