From 8591f9d5769fade07739b0284eb84c8048ca4c6d Mon Sep 17 00:00:00 2001 From: Promofaux Date: Wed, 14 Dec 2016 19:31:57 +0000 Subject: [PATCH] check for list before removing it --- gravity.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 1c1c397f..9ddd7beb 100755 --- a/gravity.sh +++ b/gravity.sh @@ -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..." - rm ${localList} + + if [[ -f ${localList} ]]; then + rm ${localList} + fi + if [[ -f /etc/hostname ]]; then hostname=$(