mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
check for list before removing it
This commit is contained in:
parent
c10ec5548f
commit
8591f9d576
1 changed files with 5 additions and 1 deletions
|
@ -243,7 +243,11 @@ gravity_unique() {
|
|||
gravity_hostFormat() {
|
||||
# Format domain list as "192.168.x.x domain.com"
|
||||
echo -n "::: Formatting domains into a HOSTS file..."
|
||||
|
||||
if [[ -f ${localList} ]]; then
|
||||
rm ${localList}
|
||||
fi
|
||||
|
||||
if [[ -f /etc/hostname ]]; then
|
||||
hostname=$(</etc/hostname)
|
||||
elif [ -x "$(command -v hostname)" ]; then
|
||||
|
|
Loading…
Reference in a new issue