1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-17 21:59:55 +00:00

Add force delete option

This commit is contained in:
Promofaux 2016-08-17 19:08:55 +01:00
parent ae47be0ce9
commit f6ac0d73b4

View File

@ -340,6 +340,23 @@ function gravity_reload() {
echo " done!"
}
for var in "$@"
do
case "$var" in
"-f" | "--force" ) force=true;;
"-h" | "--help" ) helpFunc;;
esac
done
#Overwrite adlists.default from /etc/.pihole in case any changes have been made. Changes should be saved in /etc/adlists.list
if $force; then
echo -n "::: Deleting exising list cache..."
$SUDO rm /etc/pihole/list.*
echo " done!"
fi
$SUDO cp /etc/.pihole/adlists.default /etc/pihole/adlists.default
gravity_collapse
gravity_spinup