mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Add force delete option
This commit is contained in:
parent
ae47be0ce9
commit
f6ac0d73b4
17
gravity.sh
17
gravity.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user