mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Install pihole-FTL.conf template on fresh installation (#4496)
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
241e53ed45
commit
c6a2a6f739
2 changed files with 4 additions and 2 deletions
2
advanced/Templates/pihole-FTL.conf
Normal file
2
advanced/Templates/pihole-FTL.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#; Pi-hole FTL config file
|
||||||
|
#; Comments should start with #; to avoid issues with PHP and bash reading this file
|
|
@ -1299,10 +1299,10 @@ installConfigs() {
|
||||||
echo "${DNS_SERVERS}" > "${PI_HOLE_CONFIG_DIR}/dns-servers.conf"
|
echo "${DNS_SERVERS}" > "${PI_HOLE_CONFIG_DIR}/dns-servers.conf"
|
||||||
chmod 644 "${PI_HOLE_CONFIG_DIR}/dns-servers.conf"
|
chmod 644 "${PI_HOLE_CONFIG_DIR}/dns-servers.conf"
|
||||||
|
|
||||||
# Install empty file if it does not exist
|
# Install template file if it does not exist
|
||||||
if [[ ! -r "${PI_HOLE_CONFIG_DIR}/pihole-FTL.conf" ]]; then
|
if [[ ! -r "${PI_HOLE_CONFIG_DIR}/pihole-FTL.conf" ]]; then
|
||||||
install -d -m 0755 ${PI_HOLE_CONFIG_DIR}
|
install -d -m 0755 ${PI_HOLE_CONFIG_DIR}
|
||||||
if ! install -o pihole -m 664 /dev/null "${PI_HOLE_CONFIG_DIR}/pihole-FTL.conf" &>/dev/null; then
|
if ! install -T -o pihole -m 664 "${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole-FTL.conf" "${PI_HOLE_CONFIG_DIR}/pihole-FTL.conf" &>/dev/null; then
|
||||||
printf " %bError: Unable to initialize configuration file %s/pihole-FTL.conf\\n" "${COL_LIGHT_RED}" "${PI_HOLE_CONFIG_DIR}"
|
printf " %bError: Unable to initialize configuration file %s/pihole-FTL.conf\\n" "${COL_LIGHT_RED}" "${PI_HOLE_CONFIG_DIR}"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue