I've been using Pi-hole for a couple of months, it's awesome, I love it! I've found on this forum a lot of what I wanted to do, and much more, but I still have some questions. Here goes the first one.
I've changed the column widths, drop-down list values and default number of rows on the Query Log page, but it makes updating a hassle since my queries.js file needs to be restored afterwards.
Is there a simple way to prevent that file - and possibly others - from getting updated?
No for good reasons: They usually change. However, if you find your modifications useful, we happily accept pull requests (and also feature requests if you want to discuss something) to make your individual changes available to the community. Once they are part of the official release, there is no need for local file editing anymore.
It's great that you accept pull requests, but I need to maintain that file separately at the moment, since v3.2 introduced some GUI features that... I don't understand... yet. I'll open an FR about that.
Yes, you can chattr a file and keep it from updating. However as @DL6ER points out, locking a single file or configuration may end up breaking further updates if you pull down a new Pi-hole update and there are files we have changed. Most of the files that we may modify include a header to specify that. So if you do end up with something breaking, let us know that you have chattr'd a file so that we know as well when trying to troubleshoot.
I know this is old but I ran across this same type of issue.
I changed my port to another one in lighttpd.conf so I could implement caddy server and have https without a warning. I also changed the login timeout for the web interface to 30 days in password.php and cosmetically loginpage.php. When I update pihole (pihole -up), it overwrites these files and, unless I remember, breaks the web interface.
are these files usually or ever really changed during udpates or are they just overwritten as a matter of course?