From 63b48fb5fabc1062fe60344679e5b4ca6d99b339 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 19 Oct 2025 04:11:17 -0400 Subject: [PATCH] Fix bugs and change core container --- Dockerfile | 4 ++-- app/routers/op25_controller.py | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 19d967f..13fec13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ## OP25 Core Container -FROM ubuntu:24.04 +FROM python:slim-trixie # Set environment variables ENV DEBIAN_FRONTEND=noninteractive @@ -7,7 +7,7 @@ ENV DEBIAN_FRONTEND=noninteractive # Install system dependencies RUN apt-get update && \ apt-get upgrade -y && \ - apt-get install git python3 python3-pip pulseaudio pulseaudio-utils liquidsoap -y + apt-get install git pulseaudio pulseaudio-utils liquidsoap -y # Clone the boatbod op25 repository RUN git clone -b gr310 https://github.com/boatbod/op25 /op25 diff --git a/app/routers/op25_controller.py b/app/routers/op25_controller.py index 2c9b0c1..73ae1e0 100644 --- a/app/routers/op25_controller.py +++ b/app/routers/op25_controller.py @@ -5,7 +5,6 @@ import signal import json from models import ConfigGenerator, DecodeMode, ChannelConfig, DeviceConfig, TrunkingConfig, TrunkingChannelConfig, TerminalConfig, MetadataConfig from internal.logger import create_logger -from internal.bot_manager import DiscordBotManager from internal.op25_config_utls import save_talkgroup_tags, save_whitelist, del_none_in_dict, get_current_system_from_config LOGGER = create_logger(__name__) @@ -14,7 +13,7 @@ op25_process = None OP25_PATH = "/op25/op25/gr-op25_repeater/apps/" OP25_SCRIPT = "run_multi-rx_service.sh" -def create_op25_router(bot_manager: DiscordBotManager): +def create_op25_router(): router = APIRouter() @router.post("/start") @@ -107,9 +106,6 @@ def create_op25_router(bot_manager: DiscordBotManager): with open('/configs/active.cfg.json', 'w') as f: json.dump(del_none_in_dict(config_dict), f, indent=2) - # Set the presence of the bot (if it's online) - await bot_manager.set_presence(generator.systemName) - return {"message": "Config exported to '/configs/active.cfg.json'"} except Exception as e: raise HTTPException(status_code=500, detail=str(e)) @@ -120,7 +116,6 @@ def create_op25_router(bot_manager: DiscordBotManager): if not current_system: raise HTTPException(status_code=500, detail="Unable to get current system.") - await bot_manager.set_presence(current_system) return current_system return router