improve name backup

This commit is contained in:
mercury
2023-06-28 13:27:02 +04:00
parent 35af2425b1
commit 122467c453
2 changed files with 7 additions and 3 deletions
+5 -3
View File
@@ -633,8 +633,9 @@ class Bot
public function pinBackup()
{
require __DIR__ . '/config.php';
$conf = $this->getPacConf();
$pin = $this->upload('vpnbot_export_' . date('d_m_Y_H_i') . '.json', $this->export(), $c['admin'][0])['result']['message_id'];
$conf = $this->getPacConf();
$bot = $this->request('getMyName', [])['result']['name'];
$pin = $this->upload("{$bot}_export_" . date('d_m_Y_H_i') . '.json', $this->export(), $c['admin'][0])['result']['message_id'];
$conf['pinbackup'] = "$pin/" . time();
$this->setPacConf($conf);
$this->pinAdmin($pin);
@@ -761,7 +762,8 @@ class Bot
public function exportManual()
{
return $this->upload('vpnbot_export_' . date('d_m_Y_H_i') . '.json', $this->export());
$bot = $this->request('getMyName', [])['result']['name'];
return $this->upload("{$bot}_export_" . date('d_m_Y_H_i') . '.json', $this->export());
}
public function import()
+2
View File
@@ -1,3 +1,5 @@
28.06.2023 нэйминг бэкапов
<code>git pull</code>
28.06.2023 XTLS-Reality
<code>git pull</code>
<code>make r</code>