Add hostname to teleporter backup file if called from cli

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König 2021-02-11 19:45:32 +01:00
parent debc9a69c5
commit 7dc7cbb80e

View file

@ -636,8 +636,11 @@ Interfaces:
Teleporter() {
local datetimestamp
local host
datetimestamp=$(date "+%Y-%m-%d_%H-%M-%S")
php /var/www/html/admin/scripts/pi-hole/php/teleporter.php > "pi-hole-teleporter_${datetimestamp}.tar.gz"
host=$(hostname)
host="${host//./_}"
php /var/www/html/admin/scripts/pi-hole/php/teleporter.php > "pi-hole-${host}-teleporter_${datetimestamp}.tar.gz"
}
checkDomain()