mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
always overwrite default blockpage, so that changes can be rolled out
Signed-off-by: Adam Warner <adamw@rner.email>
This commit is contained in:
parent
17be6b860e
commit
6c605f55f9
1 changed files with 18 additions and 59 deletions
|
@ -1293,46 +1293,7 @@ CreateLogFile() {
|
|||
installPiholeWeb() {
|
||||
echo ""
|
||||
echo " ${INFO} Installing blocking page..."
|
||||
# If the pihole Web directory exists,
|
||||
if [[ -d "/var/www/html/pihole" ]]; then
|
||||
local str="Installing index.php"
|
||||
echo -ne " ${INFO} ${str}..."
|
||||
# and if the index file exists,
|
||||
if [[ -f "/var/www/html/pihole/index.php" ]]; then
|
||||
# do not overwrite it,
|
||||
echo -e " ${COL_LIGHT_GREEN}detected index.php, not overwriting${COL_NC}"
|
||||
# if it doesn't exist
|
||||
else
|
||||
# install it by copying it from the repo
|
||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/index.php /var/www/html/pihole/
|
||||
echo -e "${OVER} ${TICK} ${str}"
|
||||
fi
|
||||
|
||||
local str="Installing index.js"
|
||||
echo -ne " ${INFO} ${str}..."
|
||||
# and if the index file exists,
|
||||
if [[ -f "/var/www/html/pihole/index.js" ]]; then
|
||||
# do not overwrite it,
|
||||
echo -e " ${COL_LIGHT_GREEN}detected index.js, not overwriting${COL_NC}"
|
||||
else
|
||||
# install it by copying it from the repo
|
||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/index.js /var/www/html/pihole/
|
||||
echo -e "${OVER} ${TICK} ${str}"
|
||||
fi
|
||||
|
||||
local str="Installing blockingpage.css"
|
||||
echo -ne " ${INFO} ${str}..."
|
||||
# and if the index file exists,
|
||||
if [[ -f "/var/www/html/pihole/blockingpage.css" ]]; then
|
||||
# do not overwrite it,
|
||||
echo -e " ${COL_LIGHT_GREEN}detected blockingpage.css, not overwriting${COL_NC}"
|
||||
else
|
||||
# install it by copying it from the repo
|
||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/blockingpage.css /var/www/html/pihole
|
||||
echo -e "${OVER} ${TICK} ${str}"
|
||||
fi
|
||||
# If the pihole Web directory does not exist,
|
||||
else
|
||||
local str="Creating directory for blocking page, and copying files"
|
||||
echo -ne " ${INFO} ${str}..."
|
||||
# Install the directory
|
||||
|
@ -1355,8 +1316,6 @@ installPiholeWeb() {
|
|||
No default index.lighttpd.html file found... not backing up"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Install Sudoers file
|
||||
echo ""
|
||||
local str="Installing sudoer file"
|
||||
|
|
Loading…
Reference in a new issue