mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
Create a backup before emptying the list
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
114f84c948
commit
f22b83d379
1 changed files with 3 additions and 0 deletions
|
@ -226,6 +226,9 @@ Displaylist() {
|
|||
|
||||
NukeList() {
|
||||
if [[ -f "${listMain}" ]]; then
|
||||
# Back up original list
|
||||
cp "${listMain}" "${listMain}.bck"
|
||||
# Empty out file
|
||||
echo "" > "${listMain}"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue