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

piholeDebug: Diagnose output if (Web) git directory is not found #3904

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

ganto
Copy link
Contributor

@ganto ganto commented Dec 5, 2020

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes, and have included unit tests where possible.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)

What does this PR aim to accomplish?:
If Pi-hole was installed without Web interface the piholeDebug.sh currently omits any output in the version check for the "Web" component:

*** [ DIAGNOSING ]: Core version                                                                                                                                                                                                                                                                                              
[i] Core: v5.2.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249) 
[i] Remotes: origin     https://github.com/pi-hole/pi-hole.git (fetch)                                                                                         
             origin     https://github.com/pi-hole/pi-hole.git (push)                                                                                          
[i] Branch: master                                                                                                                                                                                                                                                                                                            
[i] Commit: v5.2.1-0-g0d8ece1                                                                                                                                  
                                                                                                                                                               
*** [ DIAGNOSING ]: Web version                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                              
*** [ DIAGNOSING ]: FTL version                                                                                                                                
[✓] FTL: v5.3.2 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)

I guess it would be helpful to have more details what's up with the "Web" component.

How does this PR accomplish the above?:
I adjusted the code to print a note when the "Web" component has been disabled on purpose:

*** [ DIAGNOSING ]: Core version
[i] Core: v5.2.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin     https://github.com/pi-hole/pi-hole.git (fetch)
             origin     https://github.com/pi-hole/pi-hole.git (push)
[i] Branch: master                           
[i] Commit: v5.2.1-0-g0d8ece1             

*** [ DIAGNOSING ]: Web version 
[i] Web: Disabled in setupVars.conf via INSTALL_WEB_INTERFACE=false           
                                                                               
*** [ DIAGNOSING ]: FTL version                                      
[✓] FTL: v5.3.2 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)

And I also added a proper error message if the git directory is not found. This works for all the components tested in compare_local_version_to_git_version(). Here an example output if INSTALL_WEB_INTERFACE=true (or missing) in the setupVars.conf:

*** [ DIAGNOSING ]: Core version
[i] Core: v5.2.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin     https://github.com/pi-hole/pi-hole.git (fetch)
             origin     https://github.com/pi-hole/pi-hole.git (push)
[i] Branch: master
[i] Commit: v5.2.1-0-g0d8ece1

*** [ DIAGNOSING ]: Web version
Directory /var/www/html/admin doesn't exist

*** [ DIAGNOSING ]: FTL version
[✓] FTL: v5.3.2 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)

What documentation changes (if any) are needed to support this PR?:
No changes needed.

Signed-off-by: Reto Gantenbein <reto.gantenbein@linuxmonk.ch>
@DL6ER DL6ER merged commit 78cdd34 into pi-hole:development Dec 10, 2020
@ganto ganto deleted the fix/debug-non-web-2 branch December 11, 2020 11:38
@PromoFaux PromoFaux mentioned this pull request Dec 23, 2020
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-core-web-v5-2-2-and-ftl-v5-3-3-released/41998/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants