diff --git a/astrbot/cli/commands/cmd_init.py b/astrbot/cli/commands/cmd_init.py index 912e322bd..662b26e67 100644 --- a/astrbot/cli/commands/cmd_init.py +++ b/astrbot/cli/commands/cmd_init.py @@ -138,11 +138,7 @@ async def initialize_astrbot( default=True, ) ): - # 避免在 systemd 模式下因等待输入而阻塞 - if os.environ.get("ASTRBOT_SYSTEMD") == "1": - click.echo("Systemd detected: Skipping dashboard check.") - else: - await DashboardManager().ensure_installed(astrbot_root) + await DashboardManager().ensure_installed(astrbot_root) else: click.echo("你可以使用在线面版(需支持配置后端)来控制。") diff --git a/astrbot/cli/commands/cmd_run.py b/astrbot/cli/commands/cmd_run.py index ea9a74e85..69a3aed62 100644 --- a/astrbot/cli/commands/cmd_run.py +++ b/astrbot/cli/commands/cmd_run.py @@ -93,9 +93,7 @@ async def run_astrbot(astrbot_root: Path) -> None: os.environ.get("ASTRBOT_DASHBOARD_ENABLE", os.environ.get("DASHBOARD_ENABLE")) == "True" ): - # Avoid blocking when running under systemd by waiting for input - if os.environ.get("ASTRBOT_SYSTEMD") != "1": - await DashboardManager().ensure_installed(astrbot_root) + await DashboardManager().ensure_installed(astrbot_root) log_broker = LogBroker() LogManager.set_queue_handler(logger, log_broker)