diff --git a/install.sh b/install.sh index 0f63798..3e4cbf6 100644 --- a/install.sh +++ b/install.sh @@ -332,18 +332,18 @@ async def cmd_restart(update: Update, ctx: ContextTypes.DEFAULT_TYPE) -> None: async def cmd_logs(update: Update, ctx: ContextTypes.DEFAULT_TYPE) -> None: if not update.effective_user or not _ok(update.effective_user.id): return - running = await proxy_running() - if not running: - text = "❌ Контейнер не найден или остановлен." + is_running = await proxy_running() + if not is_running: + text = "❌ Прокси-контейнер не запущен или не найден." else: - # Запрашиваем 50 строк и объединяем выводы + # Запрашиваем 50 строк и объединяем выводы (out и err) code, out, err = await sh("docker", "logs", "--tail", "50", CONTAINER_NAME, timeout=15) - combined_logs = (out.strip() + "\n" + err.strip()).strip() + full_logs = (out.strip() + "\n" + err.strip()).strip() - if not combined_logs: - text = "📋 Контейнер запущен, но логи пока пусты.\nПопробуйте подключиться к прокси, чтобы появились записи." + if not full_logs: + text = "📋 Контейнер запущен, но записей в логах пока нет.\nПопробуйте подключиться к прокси, чтобы данные появились." else: - text = f"
{html.escape(combined_logs)}
" + text = f"
{html.escape(full_logs)}
" kb = InlineKeyboardMarkup([[InlineKeyboardButton("◀️ Меню", callback_data="menu_main")]]) if update.callback_query: