1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-03 12:40:56 +00:00

Create a backup before emptying the list

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2017-10-07 17:46:40 +02:00
parent 114f84c948
commit f22b83d379
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -226,6 +226,9 @@ Displaylist() {
NukeList() { NukeList() {
if [[ -f "${listMain}" ]]; then if [[ -f "${listMain}" ]]; then
# Back up original list
cp "${listMain}" "${listMain}.bck"
# Empty out file
echo "" > "${listMain}" echo "" > "${listMain}"
fi fi
} }