Init repo

This commit is contained in:
2025-01-25 02:31:27 -05:00
commit fd0231690b
12 changed files with 735 additions and 0 deletions

14
app/pulse.py Normal file
View File

@@ -0,0 +1,14 @@
from fastapi import APIRouter
import subprocess
import os
router = APIRouter()
pulse_process = subprocess.Popen("pulseaudio --daemonize=no --system --realtime --log-target=journal", shell=True, preexec_fn=os.setsid)
@router.get("/status")
async def get_status():
return {"status": "running" if pulse_process else "stopped"}
# subprocess.Popen(os.path.join(OP25_PATH, OP25_SCRIPT), shell=True, preexec_fn=os.setsid, cwd=OP25_PATH)