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
pihole -up/-r break lighttpd by incorrectly adding include "/etc/lighttpd/conf.d/pihole-admin.conf" to /etc/lighttpd/lighttpd.conf #5649
Comments
You have an unusual and unexpected configuration. Usually the directory Did you manually create this directory? |
No.
Am 5. Mai 2024 19:12:07 MESZ schrieb RD WebDesign ***@***.***>:
…You have an unusual and unexpected configuration.
Usually the directory `/etc/lighttpd/conf.d` is not present in Debian installs. It only exists in Fedora/CentOS/RedHat distributions.
Did you manually create this directory?
--
Reply to this email directly or view it on GitHub:
#5649 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
Typically Debian/Ubuntu families do not have this directory (it only exists in Fedora/CentOS/RedHat distributions), so the code was written taking this into account. In your case, the code correctly identifies your distribution and installs the correct files, BUT in this particular install step the directory is (unexpectedly) found. Then the file is written to the wrong directory and the include line is created. With both files (the one in Maybe @gstrauss can have a more detailed explanation, but I think the |
... I'll leave out the long history of pi-hole overwriting lighttpd.conf being unfriendly to use by anyone other than pi-hole 😉
The current configs are transitional to be more friendly and integrate better with other vhosts served by the same lighttpd instance. Once pi-hole drops support for Debian Buster (which runs an ancient version of lighttpd), the pi-hole lighttpd configs can be further simplified. Still, the shared pihole-admin.conf is most of the way there. In the meantime, here's an incremental fix: adding include "/etc/lighttpd/conf.d/pihole-admin.conf" to /etc/lighttpd/lighttpd.conf should be done only for legacy installs, not for new installs. That's something that should be fixed in the basic-install.sh script. Untested patch:
To be more robust about checking the platform, instead of checking for [Edit: the patch above should not be used on Fedora since the include line added to lighttpd.conf is needed even on newer pi-hole installations] |
For me this is an old problem (+2 years). |
I don't think this is a new/recent install. Initially the installer identified the older file and used the correct files, in (This part is a guess, but I think this is what happened)
No. |
@rdwebdesign If you don't support updating and require reinstall, you should make that clear and remove the "-up" update option. Yes, the issue has been reported/discussed, but it seems not here. Just google for it. You'll find it. |
Who said something about wipe out? I just answered the comment where gstrauss said "adding include should be done only for legacy installs, not for new installs". If you kept updating your Pi-hole installation, you actually has a normal and functional installation. The only (and very specific) issue is your lighttpd with 2 different config directories. I never saw a similar report, but looking at your debug log, I think there is a simple solution to your case:
I think this will avoid the duplication and you will be able to update Pi-hole normally. |
Worth pointing out that with V6 (currently in beta) does away with lighttpd as the web server as it is all handled by the FTL binary, so issues like this should be a thing of the past |
Respectfully, the historical problems with pi-hole overwritting the system lighttpd.conf is not a problem with lighttpd, but rather with pi-hole installation scripts. This was mostly fixed in pi-hole over a year ago with a PR that I submitted and @PromoFaux reviewed and committed. As the "OVERWRITTEN BY PI-HOLE" configs are still supported by pi-hole, and it seems like that is what @neuffer is running, one option for @neuffer is to uninstall pi-hole to remove the old configs, and then to reinstall pi-hole. I posted above that there appears to be some improvements to be made. Would you accept a PR for those items mentioned further above? |
Thanks, but there is probably very little to be gained at this stage, as the aforementioned V6 will be released sooner rather than later. I'd like to be hopeful and say this year, even! |
Versions
pihole -v
Pi-hole version is v5.18.2 (Latest: v5.18.2)
web version is v5.21 (Latest: v5.21)
FTL version is v5.25.1 (Latest: v5.25.1)
Platform
Linux pihole 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux
KVM VM
Debian Bullseye
Expected behavior
Normal working updates/repairs with
pihole -up
or
pihole -r
Actual behavior / bug
Updates and repairs FUBAR /etc/lighttpd/lighttpd.conf
by adding the following line:
include "/etc/lighttpd/conf.d/pihole-admin.conf"
to
/etc/lighttpd/lighttpd.conf
preventing lighttpd from starting.
In an Debian/Ubuntu environment this line should NOT be added.
Steps to reproduce
Run
pihole -up
or
pihole -r
will fail, since lighttpd will fail to (re-)start after the corruption of the config file
When the line is commented out, lighttpd will start again.
This error has been around for quite a while.
Debug Token
https://tricorder.pi-hole.net/MNknz3QR/
The text was updated successfully, but these errors were encountered: