mirror of
https://github.com/anten-ka/gotelegram_pro.git
synced 2026-05-21 01:56:04 +00:00
v2.5.0: add shared 443 and per-user traffic
This commit is contained in:
@@ -86,6 +86,12 @@ create_backup() {
|
||||
if [ -f "$GOTELEGRAM_DIR/stats_history.csv" ]; then
|
||||
cp "$GOTELEGRAM_DIR/stats_history.csv" "$tmp_dir/stats_history.csv" 2>/dev/null
|
||||
fi
|
||||
if [ -f "$GOTELEGRAM_DIR/user_stats_history.csv" ]; then
|
||||
cp "$GOTELEGRAM_DIR/user_stats_history.csv" "$tmp_dir/user_stats_history.csv" 2>/dev/null
|
||||
fi
|
||||
if [ -f "$GOTELEGRAM_DIR/shared-443.json" ]; then
|
||||
cp "$GOTELEGRAM_DIR/shared-443.json" "$tmp_dir/shared-443.json" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Метаданные
|
||||
local ip mode engine lang port domain
|
||||
@@ -100,7 +106,7 @@ create_backup() {
|
||||
|
||||
cat > "$tmp_dir/metadata.json" << EOMETA
|
||||
{
|
||||
"backup_version": "1.4",
|
||||
"backup_version": "1.5",
|
||||
"gotelegram_version": "$GOTELEGRAM_VERSION",
|
||||
"created_at": "$(date -Iseconds)",
|
||||
"hostname": "$(hostname)",
|
||||
@@ -310,6 +316,13 @@ restore_backup() {
|
||||
cp "$backup_dir/stats_history.csv" "$GOTELEGRAM_DIR/stats_history.csv" 2>/dev/null
|
||||
log_success "История статистики восстановлена"
|
||||
fi
|
||||
if [ -f "$backup_dir/user_stats_history.csv" ]; then
|
||||
cp "$backup_dir/user_stats_history.csv" "$GOTELEGRAM_DIR/user_stats_history.csv" 2>/dev/null
|
||||
log_success "История статистики пользователей восстановлена"
|
||||
fi
|
||||
if [ -f "$backup_dir/shared-443.json" ]; then
|
||||
cp "$backup_dir/shared-443.json" "$GOTELEGRAM_DIR/shared-443.json" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Восстанавливаем состояние бота
|
||||
if [ -d "$backup_dir/bot" ]; then
|
||||
|
||||
Reference in New Issue
Block a user