mirror of
https://codeberg.org/h3xx/you-dont-need-pihole.git
synced 2024-08-14 20:27:01 +00:00
Add configuration defaults
Don't depend on update.cfg being there. Move existing hard-coded config to example config.
This commit is contained in:
parent
00b114c85a
commit
b77bcfdb89
2 changed files with 16 additions and 7 deletions
|
@ -1,10 +1,11 @@
|
|||
# vi: ft=sh
|
||||
WORKDIR=${WORKDIR:-${BASH_SOURCE%/*}}
|
||||
BACKUPSUFFIX=.old
|
||||
BLOCKLIST=$WORKDIR/block.list
|
||||
LIST_DIR=$WORKDIR/lists
|
||||
OUT=()
|
||||
URL=()
|
||||
# Defaults:
|
||||
#WORKDIR=${WORKDIR:-${BASH_SOURCE%/*}}
|
||||
#BACKUPSUFFIX=
|
||||
#BLOCKLIST=$WORKDIR/block.list
|
||||
#LIST_DIR=$WORKDIR/lists
|
||||
#OUT=()
|
||||
#URL=()
|
||||
|
||||
# Individual hosts lists in that collection
|
||||
#OUT+=("$LIST_DIR/sb-Badd-Boyz-Hosts.hosts")
|
10
update.sh
10
update.sh
|
@ -6,7 +6,15 @@ set -e
|
|||
WORKDIR=${0%/*}
|
||||
CFG=$WORKDIR/update.cfg
|
||||
|
||||
. "$CFG"
|
||||
# Config defaults
|
||||
BACKUPSUFFIX=
|
||||
BLOCKLIST=$WORKDIR/block.list
|
||||
LIST_DIR=$WORKDIR/lists
|
||||
OUT=()
|
||||
URL=()
|
||||
if [[ -f $CFG ]]; then
|
||||
. "$CFG"
|
||||
fi
|
||||
|
||||
TEMP_DIR=$(mktemp -d -t "${0##*/}.XXXXXX")
|
||||
cleanup() {
|
||||
|
|
Loading…
Reference in a new issue