mirror of
https://github.com/andrey271192/PCAtelegram_web.git
synced 2026-09-20 11:55:32 +00:00
feat: add warp settings
This commit is contained in:
@@ -44,6 +44,9 @@ create_backup() {
|
||||
if [ -f "$PCATELEGRAM_WEB_DIR/backup_schedule.json" ]; then
|
||||
cp "$PCATELEGRAM_WEB_DIR/backup_schedule.json" "$tmp_dir/backup_schedule.json" 2>/dev/null
|
||||
fi
|
||||
if [ -f "$PCATELEGRAM_WEB_DIR/warp.json" ]; then
|
||||
cp "$PCATELEGRAM_WEB_DIR/warp.json" "$tmp_dir/warp.json" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Language marker (i18n)
|
||||
if [ -f "$PCATELEGRAM_WEB_DIR/.language" ]; then
|
||||
@@ -247,6 +250,9 @@ restore_backup() {
|
||||
if [ ! -f "$backup_dir/disabled_users.json" ] && [ -f "$tmp_dir/opt/pcatelegram_web/disabled_users.json" ]; then
|
||||
cp "$tmp_dir/opt/pcatelegram_web/disabled_users.json" "$backup_dir/disabled_users.json" 2>/dev/null || true
|
||||
fi
|
||||
if [ ! -f "$backup_dir/warp.json" ] && [ -f "$tmp_dir/opt/pcatelegram_web/warp.json" ]; then
|
||||
cp "$tmp_dir/opt/pcatelegram_web/warp.json" "$backup_dir/warp.json" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Проверяем метаданные
|
||||
if [ -f "$backup_dir/metadata.json" ]; then
|
||||
@@ -303,6 +309,11 @@ restore_backup() {
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if [ -f "$backup_dir/warp.json" ]; then
|
||||
mkdir -p "$PCATELEGRAM_WEB_DIR"
|
||||
cp "$backup_dir/warp.json" "$PCATELEGRAM_WEB_DIR/warp.json" 2>/dev/null
|
||||
chmod 600 "$PCATELEGRAM_WEB_DIR/warp.json" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Восстанавливаем language marker (i18n)
|
||||
if [ -f "$backup_dir/.language" ]; then
|
||||
|
||||
Reference in New Issue
Block a user