mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Remove moving around of the gravity and blacklist files as we do not use them any longer
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
c13ebd3a9d
commit
d7ee44960e
1 changed files with 1 additions and 17 deletions
18
pihole
18
pihole
|
@ -10,10 +10,8 @@
|
||||||
# Please see LICENSE file for your rights under this license.
|
# Please see LICENSE file for your rights under this license.
|
||||||
|
|
||||||
readonly PI_HOLE_SCRIPT_DIR="/opt/pihole"
|
readonly PI_HOLE_SCRIPT_DIR="/opt/pihole"
|
||||||
readonly gravitylist="/etc/pihole/gravity.list"
|
|
||||||
readonly blacklist="/etc/pihole/black.list"
|
|
||||||
|
|
||||||
# setupVars is not readonly here because in some funcitons (checkout),
|
# setupVars is not readonly here because in some functions (checkout),
|
||||||
# it might get set again when the installer is sourced. This causes an
|
# it might get set again when the installer is sourced. This causes an
|
||||||
# error due to modifying a readonly variable.
|
# error due to modifying a readonly variable.
|
||||||
setupVars="/etc/pihole/setupVars.conf"
|
setupVars="/etc/pihole/setupVars.conf"
|
||||||
|
@ -148,14 +146,6 @@ Time:
|
||||||
echo -e " ${INFO} Blocking already disabled, nothing to do"
|
echo -e " ${INFO} Blocking already disabled, nothing to do"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [[ -e "${gravitylist}" ]]; then
|
|
||||||
mv "${gravitylist}" "${gravitylist}.bck"
|
|
||||||
echo "" > "${gravitylist}"
|
|
||||||
fi
|
|
||||||
if [[ -e "${blacklist}" ]]; then
|
|
||||||
mv "${blacklist}" "${blacklist}.bck"
|
|
||||||
echo "" > "${blacklist}"
|
|
||||||
fi
|
|
||||||
if [[ $# > 1 ]]; then
|
if [[ $# > 1 ]]; then
|
||||||
local error=false
|
local error=false
|
||||||
if [[ "${2}" == *"s" ]]; then
|
if [[ "${2}" == *"s" ]]; then
|
||||||
|
@ -204,12 +194,6 @@ Time:
|
||||||
echo -e " ${INFO} Enabling blocking"
|
echo -e " ${INFO} Enabling blocking"
|
||||||
local str="Pi-hole Enabled"
|
local str="Pi-hole Enabled"
|
||||||
|
|
||||||
if [[ -e "${gravitylist}.bck" ]]; then
|
|
||||||
mv "${gravitylist}.bck" "${gravitylist}"
|
|
||||||
fi
|
|
||||||
if [[ -e "${blacklist}.bck" ]]; then
|
|
||||||
mv "${blacklist}.bck" "${blacklist}"
|
|
||||||
fi
|
|
||||||
sed -i "/BLOCKING_ENABLED=/d" "${setupVars}"
|
sed -i "/BLOCKING_ENABLED=/d" "${setupVars}"
|
||||||
echo "BLOCKING_ENABLED=true" >> "${setupVars}"
|
echo "BLOCKING_ENABLED=true" >> "${setupVars}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue