mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 06:48:07 +00:00
Add CACHE_SIZE to setupVars (#3170)
* Update 01-pihole.conf Signed-off-by: DoubleOhmSeven <57564379+DoubleOhmSeven@users.noreply.github.com> * Update basic-install.sh Signed-off-by: DoubleOhmSeven <57564379+DoubleOhmSeven@users.noreply.github.com> Co-authored-by: DoubleOhmSeven <57564379+DoubleOhmSeven@users.noreply.github.com>
This commit is contained in:
parent
4d98e156b6
commit
b88510d89a
@ -34,7 +34,7 @@ server=@DNS2@
|
||||
|
||||
interface=@INT@
|
||||
|
||||
cache-size=10000
|
||||
cache-size=@CACHE_SIZE@
|
||||
|
||||
log-queries
|
||||
log-facility=/var/log/pihole.log
|
||||
|
@ -82,6 +82,7 @@ IPV6_ADDRESS=${IPV6_ADDRESS}
|
||||
QUERY_LOGGING=true
|
||||
INSTALL_WEB_INTERFACE=true
|
||||
PRIVACY_LEVEL=0
|
||||
CACHE_SIZE=10000
|
||||
|
||||
if [ -z "${USER}" ]; then
|
||||
USER="$(id -un)"
|
||||
@ -1429,7 +1430,10 @@ version_check_dnsmasq() {
|
||||
#
|
||||
sed -i '/^server=@DNS2@/d' "${dnsmasq_pihole_01_location}"
|
||||
fi
|
||||
|
||||
|
||||
# Set the cache size
|
||||
sed -i "s/@CACHE_SIZE@/$CACHE_SIZE/" ${dnsmasq_pihole_01_location}
|
||||
|
||||
#
|
||||
sed -i 's/^#conf-dir=\/etc\/dnsmasq.d$/conf-dir=\/etc\/dnsmasq.d/' "${dnsmasq_conf}"
|
||||
|
||||
@ -1954,7 +1958,7 @@ finalExports() {
|
||||
# If the setup variable file exists,
|
||||
if [[ -e "${setupVars}" ]]; then
|
||||
# update the variables in the file
|
||||
sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;/INSTALL_WEB_SERVER/d;/INSTALL_WEB_INTERFACE/d;/LIGHTTPD_ENABLED/d;' "${setupVars}"
|
||||
sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;/INSTALL_WEB_SERVER/d;/INSTALL_WEB_INTERFACE/d;/LIGHTTPD_ENABLED/d;/CACHE_SIZE/d;' "${setupVars}"
|
||||
fi
|
||||
# echo the information to the user
|
||||
{
|
||||
@ -1967,6 +1971,7 @@ finalExports() {
|
||||
echo "INSTALL_WEB_SERVER=${INSTALL_WEB_SERVER}"
|
||||
echo "INSTALL_WEB_INTERFACE=${INSTALL_WEB_INTERFACE}"
|
||||
echo "LIGHTTPD_ENABLED=${LIGHTTPD_ENABLED}"
|
||||
echo "CACHE_SIZE=${CACHE_SIZE}"
|
||||
}>> "${setupVars}"
|
||||
chmod 644 "${setupVars}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user