Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconfigure to add web admin fails #5473

Open
KenSharp opened this issue Nov 4, 2023 · 3 comments
Open

Reconfigure to add web admin fails #5473

KenSharp opened this issue Nov 4, 2023 · 3 comments
Labels
Bug: Confirmed Verified as a bug to be resolved

Comments

@KenSharp
Copy link

KenSharp commented Nov 4, 2023

Versions

Pi-hole version is v5.17.2 (Latest: v5.17.2)
FTL version is v5.23 (Latest: v5.23)

Platform

  • OS and version: Ubuntu 22.04 x86_64 (host and guest)
  • Platform: LXC

Expected behavior

pihole -r should allow me to reconfigure and add the web admin interface.

Actual behavior / bug

It simply fails.

  [i] Installing Admin Web Interface
  [i] Installing lighttpd
  [i] Query Logging on.
  [i] Using privacy level: 0
  [i] Performing reconfiguration, skipping download of local repos
  [✓] Resetting repository within /etc/.pihole...
   Unable to reset /var/www/html/admin, exiting installer

There seems to be some assumption here about this path existing? /var/www does not exist at all.

Steps to reproduce

Steps to reproduce the behavior:

  1. Install pihole with the bash script, do not install the web admin interface.
  2. pihole -r
  3. Attempt to install the web admin interface.
  4. See error

Debug Token

@KenSharp
Copy link
Author

KenSharp commented Nov 4, 2023

Tried again after manually installing lighttpd and the result is the same, only this time /var/www/html (not /admin) does exist.

@yubiuser
Copy link
Member

yubiuser commented Nov 9, 2023

Thanks for reporting. This is a bug. It's happening because you run a reconfigure and choose to install the web interface now but did not previously. We therefore assume we can reset that repo without further check if the repo exists at all.

clone_or_update_repos() {
# If the user wants to reconfigure,
if [[ "${reconfigure}" == true ]]; then
printf " %b Performing reconfiguration, skipping download of local repos\\n" "${INFO}"
# Reset the Core repo
resetRepo ${PI_HOLE_LOCAL_REPO} || \
{ printf " %b Unable to reset %s, exiting installer%b\\n" "${COL_LIGHT_RED}" "${PI_HOLE_LOCAL_REPO}" "${COL_NC}"; \
exit 1; \
}
# If the Web interface was installed,
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
# reset it's repo
resetRepo ${webInterfaceDir} || \


Note: this bug does not exist in v6 as we always install the web interface (see the missing if [[ "${INSTALL_WEB_INTERFACE}" == true ]]

clone_or_update_repos() {
# If the user wants to reconfigure,
if [[ "${reconfigure}" == true ]]; then
printf " %b Performing reconfiguration, skipping download of local repos\\n" "${INFO}"
# Reset the Core repo
resetRepo ${PI_HOLE_LOCAL_REPO} || \
{ printf " %b Unable to reset %s, exiting installer%b\\n" "${COL_LIGHT_RED}" "${PI_HOLE_LOCAL_REPO}" "${COL_NC}"; \
exit 1; \
}
# Reset the Web repo
resetRepo ${webInterfaceDir} || \

@yubiuser yubiuser added the Bug: Confirmed Verified as a bug to be resolved label Nov 9, 2023
@yubiuser
Copy link
Member

yubiuser commented Nov 9, 2023

I'm not sure ii we are going to fix the bug in v5. As a workaround, clone the web interface manually:

sudo git clone https://github.com/pi-hole/web.git /var/www/html/admin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Confirmed Verified as a bug to be resolved
Projects
None yet
Development

No branches or pull requests

2 participants