mirror of
https://codeberg.org/h3xx/you-dont-need-pihole.git
synced 2024-08-14 20:27:01 +00:00
Fix blocklist permissions on first generation
This commit is contained in:
parent
8fbca993fa
commit
afa73e31f6
2 changed files with 15 additions and 0 deletions
|
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
- Prevent AdroitAdorKhan-EnergizedProtection updates (current repo has a broken
|
||||
list)
|
||||
- Fix `block.list` permissions on first generation.
|
||||
|
||||
### Removed
|
||||
- Removed in-repo custom ad domains list
|
||||
|
|
14
update.sh
14
update.sh
|
@ -92,6 +92,20 @@ done
|
|||
|
||||
TEMP_BLOCKLIST=$(mktemp -p "$TEMP_DIR")
|
||||
"$WORKDIR/make-block.pl" --out="$TEMP_BLOCKLIST"
|
||||
|
||||
# Blocklist generation succeeded, install it!
|
||||
|
||||
if [[ ! -e $BLOCKLIST ]]; then
|
||||
(
|
||||
# First time:
|
||||
# Create an empty blocklist with -rw-r--r-- permissions.
|
||||
# Prevents file not being readable; disregard permissions coming from
|
||||
# whatever file permissions 'mktemp' sets.
|
||||
umask 0022
|
||||
touch -- "$BLOCKLIST"
|
||||
)
|
||||
fi
|
||||
|
||||
replace_with "$BLOCKLIST" "$TEMP_BLOCKLIST"
|
||||
|
||||
if [[ ${#DNSMASQ_RESTART_COMMAND[@]} -gt 0 ]]; then
|
||||
|
|
Loading…
Reference in a new issue