mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +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
2 changed files with 8 additions and 3 deletions
|
@ -34,7 +34,7 @@ server=@DNS2@
|
||||||
|
|
||||||
interface=@INT@
|
interface=@INT@
|
||||||
|
|
||||||
cache-size=10000
|
cache-size=@CACHE_SIZE@
|
||||||
|
|
||||||
log-queries
|
log-queries
|
||||||
log-facility=/var/log/pihole.log
|
log-facility=/var/log/pihole.log
|
||||||
|
|
|
@ -82,6 +82,7 @@ IPV6_ADDRESS=${IPV6_ADDRESS}
|
||||||
QUERY_LOGGING=true
|
QUERY_LOGGING=true
|
||||||
INSTALL_WEB_INTERFACE=true
|
INSTALL_WEB_INTERFACE=true
|
||||||
PRIVACY_LEVEL=0
|
PRIVACY_LEVEL=0
|
||||||
|
CACHE_SIZE=10000
|
||||||
|
|
||||||
if [ -z "${USER}" ]; then
|
if [ -z "${USER}" ]; then
|
||||||
USER="$(id -un)"
|
USER="$(id -un)"
|
||||||
|
@ -1429,7 +1430,10 @@ version_check_dnsmasq() {
|
||||||
#
|
#
|
||||||
sed -i '/^server=@DNS2@/d' "${dnsmasq_pihole_01_location}"
|
sed -i '/^server=@DNS2@/d' "${dnsmasq_pihole_01_location}"
|
||||||
fi
|
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}"
|
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 the setup variable file exists,
|
||||||
if [[ -e "${setupVars}" ]]; then
|
if [[ -e "${setupVars}" ]]; then
|
||||||
# update the variables in the file
|
# 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
|
fi
|
||||||
# echo the information to the user
|
# echo the information to the user
|
||||||
{
|
{
|
||||||
|
@ -1967,6 +1971,7 @@ finalExports() {
|
||||||
echo "INSTALL_WEB_SERVER=${INSTALL_WEB_SERVER}"
|
echo "INSTALL_WEB_SERVER=${INSTALL_WEB_SERVER}"
|
||||||
echo "INSTALL_WEB_INTERFACE=${INSTALL_WEB_INTERFACE}"
|
echo "INSTALL_WEB_INTERFACE=${INSTALL_WEB_INTERFACE}"
|
||||||
echo "LIGHTTPD_ENABLED=${LIGHTTPD_ENABLED}"
|
echo "LIGHTTPD_ENABLED=${LIGHTTPD_ENABLED}"
|
||||||
|
echo "CACHE_SIZE=${CACHE_SIZE}"
|
||||||
}>> "${setupVars}"
|
}>> "${setupVars}"
|
||||||
chmod 644 "${setupVars}"
|
chmod 644 "${setupVars}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue