mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Moved FTL configuration copy in to scripts copy function.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
af13ceac24
commit
17c1e64f7e
1 changed files with 12 additions and 10 deletions
|
@ -1219,12 +1219,19 @@ installScripts() {
|
|||
install -o "${USER}" -Dm755 -t /usr/local/bin/ pihole
|
||||
install -Dm644 ./advanced/bash-completion/pihole /etc/bash_completion.d/pihole
|
||||
echo -e "${OVER} ${TICK} ${str}"
|
||||
# Install template if it does not exist
|
||||
if [[ ! -f "/etc/pihole/pihole-FTL.conf" ]]; then
|
||||
if ! sudo -u ${USER} touch "${PI_HOLE_INSTALL_DIR}/pihole-FTL.conf" 2&>1 /dev/null; then
|
||||
echo -e " ${COL_LIGHT_RED}Error: Unable to initialize configuration file /etc/pihole/pihole-FTL.conf"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
# Otherwise,
|
||||
else
|
||||
# Show an error and exit
|
||||
echo -e "${OVER} ${CROSS} ${str}
|
||||
${COL_LIGHT_RED}Error: Local repo ${PI_HOLE_LOCAL_REPO} not found, exiting installer${COL_NC}"
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -1770,7 +1777,10 @@ installPihole() {
|
|||
accountForRefactor
|
||||
fi
|
||||
# Install base files and web interface
|
||||
installScripts
|
||||
if ! installScripts; then
|
||||
echo -e " {CROSS} Failure in dependent script copy function."
|
||||
exit 1
|
||||
fi
|
||||
# Install config files
|
||||
installConfigs
|
||||
# If the user wants to install the dashboard,
|
||||
|
@ -2025,14 +2035,6 @@ FTLinstall() {
|
|||
# Always replace pihole-FTL.service
|
||||
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
|
||||
if ! sudo -u ${USER} touch "/etc/pihole/pihole-FTL.conf" 2&>1 /dev/null; then
|
||||
echo -e " ${COL_LIGHT_RED}Error: Unable to initialize configuration file /etc/pihole/pihole-FTL.conf"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
local ftlBranch
|
||||
local url
|
||||
|
||||
|
|
Loading…
Reference in a new issue