Merge pull request #2208 from pi-hole/tweak/checkout

Don't run the installer when doing ftl checkout, instead just run the…
This commit is contained in:
Mark Drobnak 2018-06-03 14:35:35 -04:00 committed by GitHub
commit d232f08933
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,6 +166,9 @@ checkout() {
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
FTLinstall "${binary}"
start_service pihole-FTL
enable_service pihole-FTL
else else
echo " ${CROSS} Requested branch \"${2}\" is not available" echo " ${CROSS} Requested branch \"${2}\" is not available"
ftlbranches=( $(git ls-remote https://github.com/pi-hole/ftl | grep 'heads' | sed 's/refs\/heads\///;s/ //g' | awk '{print $2}') ) ftlbranches=( $(git ls-remote https://github.com/pi-hole/ftl | grep 'heads' | sed 's/refs\/heads\///;s/ //g' | awk '{print $2}') )
@ -180,7 +183,7 @@ checkout() {
fi fi
# Force updating everything # Force updating everything
if [[ ! "${1}" == "web" ]]; then if [[ ! "${1}" == "web" && ! "${1}" == "ftl" ]]; then
echo -e " ${INFO} Running installer to upgrade your installation" echo -e " ${INFO} Running installer to upgrade your installation"
if "${PI_HOLE_FILES_DIR}/automated install/basic-install.sh" --unattended; then if "${PI_HOLE_FILES_DIR}/automated install/basic-install.sh" --unattended; then
exit 0 exit 0