Skip to content

Commit

Permalink
Include hostname in backup filename. Will add nothing if no hostname …
Browse files Browse the repository at this point in the history
…detected.

Signed-off-by: Adam Warner <[email protected]>
  • Loading branch information
PromoFaux committed Jun 1, 2020
1 parent 105d880 commit ee89ab3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/pi-hole/php/teleporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@ function process_file($contents)
}
else
{
$tarname = "pi-hole-teleporter_".date("Y-m-d_H-i-s").".tar";
$hostname = gethostname() ? gethostname()."-" : "";
$tarname = "pi-hole-".$hostname."teleporter_".date("Y-m-d_H-i-s").".tar";
$filename = $tarname.".gz";
$archive_file_name = sys_get_temp_dir() ."/". $tarname;
$archive = new PharData($archive_file_name);
Expand Down

0 comments on commit ee89ab3

Please sign in to comment.