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

Merge pull request #4049 from yubiuser/tewak/teleporter_cli

Add hostname to teleporter backup file if called from cli
This commit is contained in:
Dan Schaper 2021-02-16 08:02:49 -08:00 committed by GitHub
commit 03a8ca5c1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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:-noname}-teleporter_${datetimestamp}.tar.gz"
}
checkDomain()