jacklul / pihole-updatelists

Update Pi-hole's lists from remote sources easily
MIT License
1.44k stars 84 forks source link

[Feature request] Assign GROUP_ID to WHITELIST_URL, REGEX_WHITELIST_URL, BLACKLIST_URL and REGEX_BLACKLIST_URL #110

Closed dannykorpan closed 2 years ago

dannykorpan commented 2 years ago

It would be great if it's possible to assign GROUP_ID to WHITELIST_URL, REGEX_WHITELIST_URL, BLACKLIST_URL and REGEX_BLACKLIST_URL.

jacklul commented 2 years ago

What do you mean? You can already assign group to those

dannykorpan commented 2 years ago

My pihole-updatelists.url looks like this

; Pi-hole's Lists Updater by Jack'lul
; https://github.com/jacklul/pihole-updatelists
; For a full list of available variables please see the readme.

; Remote list URL containing list of adlists to import
; URLs to single adlists are not supported here!
ADLISTS_URL="https://v.firebog.net/hosts/lists.php?type=tick"

GROUP_ID=-3

; Remote list URL containing exact domains to whitelist
WHITELIST_URL="https://raw.githubusercontent.com/anudeepND/whitelist/master/domains/whitelist.txt"

; Remote list URL containing regex rules for whitelisting
REGEX_WHITELIST_URL=""

; Remote list URL containing exact domains to blacklist
; This is specifically for handcrafted lists only, do not use regular blocklists here!
BLACKLIST_URL=""

; Remote list URL containing regex rules for blacklisting
REGEX_BLACKLIST_URL=""

COMMENT="Managed by pihole-updatelists"

But the whitelist_urls are not assigned to group id 3 (named TESTGROUP), instead only to default.

grafik
jacklul commented 2 years ago

Did you run the script prior to adding GROUP_ID=-3 to the config? By default the group is only assigned on the record creation, if the entry already exists it will not have group id assigned Try setting PERSISTENT_GROUP=true

dannykorpan commented 2 years ago

Yes, prior, but not with PERSISTENT_GROUP=true it's working. Thank you for your very quick support!