mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
Move template files to own subdir. Include pihole-FTL.conf in templates.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
32cf94fc74
commit
b79ff05e29
6 changed files with 87 additions and 4 deletions
78
advanced/Templates/pihole-FTL.conf
Normal file
78
advanced/Templates/pihole-FTL.conf
Normal file
|
@ -0,0 +1,78 @@
|
|||
## Listen only for local socket connections or permit all connections
|
||||
## Options: localonly, all
|
||||
|
||||
#SOCKET_LISTENING=localonly
|
||||
|
||||
## Display all queries? Set to no to hide query display
|
||||
## Options: yes, no
|
||||
|
||||
#QUERY_DISPLAY=yes
|
||||
|
||||
## Allow FTL to analyze AAAA queries from pihole.log?
|
||||
## Options: yes, no
|
||||
|
||||
#AAAA_QUERY_ANALYSIS=yes
|
||||
|
||||
## Should FTL try to resolve IPv6 addresses to host names?
|
||||
## Options: yes, no
|
||||
|
||||
#RESOLVE_IPV6=yes
|
||||
|
||||
## Should FTL try to resolve IPv4 addresses to host names?
|
||||
## Options: yes, no
|
||||
|
||||
#RESOLVE_IPV4=yes
|
||||
|
||||
## How long should queries be stored in the database [days]?
|
||||
## Setting this to 0 disables the database
|
||||
## See: https://docs.pi-hole.net/ftldns/database/
|
||||
## Options: number of days
|
||||
|
||||
#MAXDBDAYS=365
|
||||
|
||||
## How often do we store queries in FTL's database [minutes]?
|
||||
## See: https://docs.pi-hole.net/ftldns/database/
|
||||
## Options: number of minutes
|
||||
|
||||
#DBINTERVAL=1.0
|
||||
|
||||
## Specify path and filename of FTL's SQLite3 long-term database.
|
||||
## Setting this to DBFILE= disables the database altogether
|
||||
## See: https://docs.pi-hole.net/ftldns/database/
|
||||
## Option: path to db file
|
||||
|
||||
#DBFILE=/etc/pihole/pihole-FTL.db
|
||||
|
||||
## Up to how many hours of queries should be imported from the database and logs [hours]?
|
||||
## Maximum is 744 (31 days)
|
||||
## Options: number of days
|
||||
|
||||
#MAXLOGAGE=24.0
|
||||
|
||||
## On which port should FTL be listening?
|
||||
## Options: tcp port
|
||||
|
||||
#FTLPORT=4711
|
||||
|
||||
## Which privacy level is used?
|
||||
## See: https://docs.pi-hole.net/ftldns/privacylevels/
|
||||
## Options: 0, 1, 2, 3
|
||||
|
||||
#PRIVACYLEVEL=0
|
||||
|
||||
## Should FTL ignore queries coming from the local machine?
|
||||
## Options: yes, no
|
||||
|
||||
#IGNORE_LOCALHOST=no
|
||||
|
||||
## How should FTL reply to blocked queries?
|
||||
## See: https://docs.pi-hole.net/ftldns/blockingmode/
|
||||
## Options: NULL, IP-AAAA-NODATA, IP, NXDOMAIN
|
||||
|
||||
#BLOCKINGMODE=NULL
|
||||
|
||||
## Controls if FTLDNS should print extended details about regex matching into pihole-FTL.log.
|
||||
## See: https://docs.pi-hole.net/ftldns/regex/overview/
|
||||
## Options: true, false
|
||||
|
||||
#REGEX_DEBUGMODE=false
|
|
@ -1553,7 +1553,7 @@ installPiholeWeb() {
|
|||
# Make the .d directory if it doesn't exist
|
||||
mkdir -p /etc/sudoers.d/
|
||||
# and copy in the pihole sudoers file
|
||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/pihole.sudo /etc/sudoers.d/pihole
|
||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole.sudo /etc/sudoers.d/pihole
|
||||
# Add lighttpd user (OS dependent) to sudoers file
|
||||
echo "${LIGHTTPD_USER} ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole
|
||||
|
||||
|
@ -1575,7 +1575,7 @@ installCron() {
|
|||
echo ""
|
||||
echo -ne " ${INFO} ${str}..."
|
||||
# Copy the cron file over from the local repo
|
||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/pihole.cron /etc/cron.d/pihole
|
||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole.cron /etc/cron.d/pihole
|
||||
# Randomize gravity update time
|
||||
sed -i "s/59 1 /$((1 + RANDOM % 58)) $((3 + RANDOM % 2))/" /etc/cron.d/pihole
|
||||
# Randomize update checker time
|
||||
|
@ -1699,7 +1699,7 @@ installLogrotate() {
|
|||
echo ""
|
||||
echo -ne " ${INFO} ${str}..."
|
||||
# Copy the file over from the local repo
|
||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/logrotate /etc/pihole/logrotate
|
||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/Templates/logrotate /etc/pihole/logrotate
|
||||
# Different operating systems have different user / group
|
||||
# settings for logrotate that makes it impossible to create
|
||||
# a static logrotate file that will work with e.g.
|
||||
|
@ -2023,7 +2023,12 @@ FTLinstall() {
|
|||
pushd "$(mktemp -d)" > /dev/null || { echo "Unable to make temporary directory for FTL binary download"; return 1; }
|
||||
|
||||
# Always replace pihole-FTL.service
|
||||
install -T -m 0755 "${PI_HOLE_LOCAL_REPO}/advanced/pihole-FTL.service" "/etc/init.d/pihole-FTL"
|
||||
install -T -m 0755 "${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole-FTL.service" "/etc/init.d/pihole-FTL"
|
||||
|
||||
# Install template if it does not exist
|
||||
if [[ ! -f /etc/pihole/pihole-FTL.conf ]]; then
|
||||
install -o "${USER}" -Dm644 -t "${PI_HOLE_INSTALL_DIR}/advanced/Templates/pihole-FTL.conf" "/etc/pihole/pihole-FTL.conf"
|
||||
fi
|
||||
|
||||
local ftlBranch
|
||||
local url
|
||||
|
|
Loading…
Reference in a new issue