Add default noname if hostname is empty

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König 2021-02-12 20:25:01 +01:00
parent 7dc7cbb80e
commit 78027bd2bf

View file

@ -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()