mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-24 08:10:14 +00:00
Incorporates changes requested by @Mcat12
Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com>
This commit is contained in:
parent
5c575e73c7
commit
8a92fb24c4
8 changed files with 37 additions and 44 deletions
|
@ -92,13 +92,13 @@ PoplistFile() {
|
|||
# Check whitelist file exists, and if not, create it
|
||||
if [[ ! -f "${whitelist}" ]]; then
|
||||
touch "${whitelist}"
|
||||
chmod a+r "${whitelist}"
|
||||
chmod 644 "${whitelist}"
|
||||
fi
|
||||
|
||||
# Check blacklist file exists, and if not, create it
|
||||
if [[ ! -f "${blacklist}" ]]; then
|
||||
touch "${blacklist}"
|
||||
chmod a+r "${blacklist}"
|
||||
chmod 644 "${blacklist}"
|
||||
fi
|
||||
|
||||
for dom in "${domList[@]}"; do
|
||||
|
@ -244,7 +244,7 @@ NukeList() {
|
|||
cp -p "${listMain}" "${listMain}.bck~"
|
||||
# Empty out file
|
||||
echo "" > "${listMain}"
|
||||
chmod a+r "${listMain}"
|
||||
chmod 644 "${listMain}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ checkout() {
|
|||
local path
|
||||
path="development/${binary}"
|
||||
echo "development" > /etc/pihole/ftlbranch
|
||||
chmod a+r /etc/pihole/ftlbranch
|
||||
chmod 644 /etc/pihole/ftlbranch
|
||||
elif [[ "${1}" == "master" ]] ; then
|
||||
# Shortcut to check out master branches
|
||||
echo -e " ${INFO} Shortcut \"master\" detected - checking out master branches..."
|
||||
|
@ -105,7 +105,7 @@ checkout() {
|
|||
local path
|
||||
path="master/${binary}"
|
||||
echo "master" > /etc/pihole/ftlbranch
|
||||
chmod a+r /etc/pihole/ftlbranch
|
||||
chmod 644 /etc/pihole/ftlbranch
|
||||
elif [[ "${1}" == "core" ]] ; then
|
||||
str="Fetching branches from ${piholeGitUrl}"
|
||||
echo -ne " ${INFO} $str"
|
||||
|
@ -168,7 +168,7 @@ checkout() {
|
|||
if check_download_exists "$path"; then
|
||||
echo " ${TICK} Branch ${2} exists"
|
||||
echo "${2}" > /etc/pihole/ftlbranch
|
||||
chmod a+r /etc/pihole/ftlbranch
|
||||
chmod 644 /etc/pihole/ftlbranch
|
||||
FTLinstall "${binary}"
|
||||
restart_service pihole-FTL
|
||||
enable_service pihole-FTL
|
||||
|
|
|
@ -41,7 +41,7 @@ if [[ "$@" == *"once"* ]]; then
|
|||
# moved file (it will have the same file handler)
|
||||
cp -p /var/log/pihole.log /var/log/pihole.log.1
|
||||
echo " " > /var/log/pihole.log
|
||||
chmod a+r /var/log/pihole.log
|
||||
chmod 644 /var/log/pihole.log
|
||||
fi
|
||||
else
|
||||
# Manual flushing
|
||||
|
@ -54,7 +54,7 @@ else
|
|||
echo " " > /var/log/pihole.log
|
||||
if [ -f /var/log/pihole.log.1 ]; then
|
||||
echo " " > /var/log/pihole.log.1
|
||||
chmod a+r /var/log/pihole.log.1
|
||||
chmod 644 /var/log/pihole.log.1
|
||||
fi
|
||||
fi
|
||||
# Delete most recent 24 hours from FTL's database, leave even older data intact (don't wipe out all history)
|
||||
|
|
|
@ -51,7 +51,7 @@ if [[ "$2" == "remote" ]]; then
|
|||
|
||||
GITHUB_CORE_VERSION="$(json_extract tag_name "$(curl -s 'https://api.github.com/repos/pi-hole/pi-hole/releases/latest' 2> /dev/null)")"
|
||||
echo -n "${GITHUB_CORE_VERSION}" > "${GITHUB_VERSION_FILE}"
|
||||
chmod a+r "${GITHUB_VERSION_FILE}"
|
||||
chmod 644 "${GITHUB_VERSION_FILE}"
|
||||
|
||||
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
|
||||
GITHUB_WEB_VERSION="$(json_extract tag_name "$(curl -s 'https://api.github.com/repos/pi-hole/AdminLTE/releases/latest' 2> /dev/null)")"
|
||||
|
@ -67,7 +67,7 @@ else
|
|||
|
||||
CORE_BRANCH="$(get_local_branch /etc/.pihole)"
|
||||
echo -n "${CORE_BRANCH}" > "${LOCAL_BRANCH_FILE}"
|
||||
chmod a+r "${LOCAL_BRANCH_FILE}"
|
||||
chmod 644 "${LOCAL_BRANCH_FILE}"
|
||||
|
||||
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
|
||||
WEB_BRANCH="$(get_local_branch /var/www/html/admin)"
|
||||
|
@ -81,7 +81,7 @@ else
|
|||
|
||||
CORE_VERSION="$(get_local_version /etc/.pihole)"
|
||||
echo -n "${CORE_VERSION}" > "${LOCAL_VERSION_FILE}"
|
||||
chmod a+r "${LOCAL_VERSION_FILE}"
|
||||
chmod 644 "${LOCAL_VERSION_FILE}"
|
||||
|
||||
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
|
||||
WEB_VERSION="$(get_local_version /var/www/html/admin)"
|
||||
|
|
|
@ -322,7 +322,7 @@ dhcp-option=option:router,${DHCP_ROUTER}
|
|||
dhcp-leasefile=/etc/pihole/dhcp.leases
|
||||
#quiet-dhcp
|
||||
" > "${dhcpconfig}"
|
||||
chmod a+r "${dhcpconfig}"
|
||||
chmod 644 "${dhcpconfig}"
|
||||
|
||||
if [[ "${PIHOLE_DOMAIN}" != "none" ]]; then
|
||||
echo "domain=${PIHOLE_DOMAIN}" >> "${dhcpconfig}"
|
||||
|
@ -542,13 +542,13 @@ addAudit()
|
|||
do
|
||||
echo "${var}" >> /etc/pihole/auditlog.list
|
||||
done
|
||||
chmod a+r /etc/pihole/auditlog.list
|
||||
chmod 644 /etc/pihole/auditlog.list
|
||||
}
|
||||
|
||||
clearAudit()
|
||||
{
|
||||
echo -n "" > /etc/pihole/auditlog.list
|
||||
chmod a+r /etc/pihole/auditlog.list
|
||||
chmod 644 /etc/pihole/auditlog.list
|
||||
}
|
||||
|
||||
SetPrivacyLevel() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue