1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-02 20:20:56 +00:00

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