Add Switch for Update w/o Adlist Update

part of my update script for Pi-Hole checks the adlist table for changes and updates if needed, so what happens is that the adlist contents are updated twice in a row. It would be nice if there was a paramter switch to exlude this from happening during the regular update process (eg 'pihole -up --skip-adlist-update)

Why not change your script?

change it how? update the adlists before doing a Pi-Hole update? what if the update modifies the adlists? what if the script finds no Pi-Hole update but I still want to update the adlists?

edit just checked and neither "pihole -up -g" or "pihole -up || pihole -g" will perform an adlist update if there's no update

I don't think I understand what your script is doing. Can you describe it or post it?

Are you using a script to auto-update Pi-hole? If so, this is not recommended.

on further consideration I think that -up and -g should be separate functions. 'pihole -up' shouldn't refresh the adlists, if you want both it should be 'pihole -up -g'.

script does...

  1. update system (raspbian)
  2. update pihole
  3. update pihole adlists from firebog repo

steps 2 (if there's an update) and step 3 (always) refresh the adlists

My advice - get rid of step 2. Updating Pi-hole without reading the release notes and understanding how the update affects your installation is not recommended. This is why there is no auto-update feature included in Pi-hole.

Given that auto-update is not something that Pi-hole offers (or is likely to offer), I don't think that changing the Pi-hole update script to accomodate user auto-update scripts is likely to happen.

Pi-hole updates only modify the default adlists offered if you reconfigure, they do not change your existing adlists, which are stored in your gravity database.

then why are adlists refreshed as part of the update?

yep, I totally get that this isn't likely to happen as it's probably not something that affects many people. but hopefully it doesn't hurt to ask...

Adlists are not refreshed, but gravity is rebuilt. Is that the question?

they are refreshed as part of the gravity rebuild. is there any way to refresh the lists without rebuilding gravity? the two things are the same for purposes of discussion here.

No, why would you want to grab the latest contents of the lists and then not use them?

Sometimes the structure of the gravity database has been modified (even if only slightly) as part of a new update. Therefore it is necessary to update gravity after an update of pihole.

Side note: pihole updates gravity on a weekly basis Sunday morning anyway. So doing it once more doesn't hurt.

I agree that doing it twice in a row doesn't "hurt" anything, it's just unnecessary in this case.

thanks for the feedback.

I would humbly suggest that you edit your script to not do what Pi-hole already does quite well.

I have no idea what you're suggesting here... as far as I am aware Pi-Hole is unable to sync adlist repositories, in order to do this I need to custom-write a script that will perform this function. here is the script in case you're interested. this is something Pi-Hole doesn't do at all, much less "quite well".

I'm very grateful for Pi-Hole and all the development that went into it. please don't take my feature request as intimating that Pi-Hole is not awesome, but like all things it can be improved upon. like I said previously, I don't expect much traction on this because is seems that most people don't use Pi-Hole this way, but I have no interest in curating my own adlists, why would I when there's already a few great resources out there like Firebog.net to sync from?

if this feature isn't something deemed "worthy" by the maintainers I'll just continue to double-sync adlists.

As jfb already said, you should not update pihole via script.

That aside, you would archive the same outcome, if you first do your list manipulation and update pihole at the end. Then there would also be no reason for reloading and pihole -up as it is all done during pihole updating. Also the basis for this FR would be gone...

I will continue to update by a script, thanks for the feedback. why anyone would NOT script menial, repeated tasks is beyond me... even if I agreed with you, doing this manually would not stop the double-sync from happening, so you're just gas-lighting anyways.

as already stated in this thread, "pihole -up" does not always refresh the adlists, only when there's an update, so it's not a reliable method of maintaining the adlists outside of the "pihole -up" process.

You want to take a few days in the sin bin?

Edit: What the hell, I'm in a good mood. You're causing your own problems and when we tell you it's you causing your own problems it's because you're causing your own problems. Moron.

Do what ever the hell you want to bucky, you're not going to listen to anyone telling you it's a stupid idea anyways.

thanks for your honest feedback! I feel like you're completely missing the point of this request but I suppose we'll agree to disagree.