From 78027bd2bfeba890af7a0e440b9c7b6b15c9b3d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Fri, 12 Feb 2021 20:25:01 +0100 Subject: [PATCH] Add default noname if hostname is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- advanced/Scripts/webpage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 5e7d90f9..53f815c5 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -640,7 +640,7 @@ Teleporter() { datetimestamp=$(date "+%Y-%m-%d_%H-%M-%S") host=$(hostname) host="${host//./_}" - php /var/www/html/admin/scripts/pi-hole/php/teleporter.php > "pi-hole-${host}-teleporter_${datetimestamp}.tar.gz" + php /var/www/html/admin/scripts/pi-hole/php/teleporter.php > "pi-hole-${host:-noname}-teleporter_${datetimestamp}.tar.gz" } checkDomain()