mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
add parameter to set filename for teleporter
Make it possible to write pihole -a -t myname.tar.gz to configure the filename however you want Signed-off-by: Lukas Schlötterer <80917404+lschloetterer@users.noreply.github.com>
This commit is contained in:
parent
e80a7731c9
commit
bad6d8a59e
@ -640,12 +640,17 @@ Interfaces:
|
|||||||
}
|
}
|
||||||
|
|
||||||
Teleporter() {
|
Teleporter() {
|
||||||
local datetimestamp
|
local filename
|
||||||
local host
|
filename="${args[2]}"
|
||||||
datetimestamp=$(date "+%Y-%m-%d_%H-%M-%S")
|
if [[ -z "${filename}" ]]; then
|
||||||
host=$(hostname)
|
local datetimestamp
|
||||||
host="${host//./_}"
|
local host
|
||||||
php /var/www/html/admin/scripts/pi-hole/php/teleporter.php > "pi-hole-${host:-noname}-teleporter_${datetimestamp}.tar.gz"
|
datetimestamp=$(date "+%Y-%m-%d_%H-%M-%S")
|
||||||
|
host=$(hostname)
|
||||||
|
host="${host//./_}"
|
||||||
|
filename="pi-hole-${host:-noname}-teleporter_${datetimestamp}.tar.gz"
|
||||||
|
fi
|
||||||
|
php /var/www/html/admin/scripts/pi-hole/php/teleporter.php > "${filename}"
|
||||||
}
|
}
|
||||||
|
|
||||||
checkDomain()
|
checkDomain()
|
||||||
|
Loading…
Reference in New Issue
Block a user