#!/usr/bin/env python3
"""Startet poe.sh innerhalb der venv des PoE Managers (z.B. für Cron/Timer)."""
import os
import subprocess

BASE_DIR = os.path.dirname(os.path.abspath(__file__))
POE_SCRIPT = os.environ.get("POE_SCRIPT", "/usr/local/bin/custom/poe.sh")

subprocess.run(
    ["/bin/bash", POE_SCRIPT],
    env={"PATH": os.path.join(BASE_DIR, "venv", "bin") + ":" + os.environ.get("PATH", "")},
)
