mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Add force delete option
This commit is contained in:
parent
ae47be0ce9
commit
f6ac0d73b4
1 changed files with 17 additions and 0 deletions
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 a new issue