mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-09 07:25:44 +02:00
32 lines
927 B
Desktop File
32 lines
927 B
Desktop File
[Unit]
|
|
Description=BamBuddy Print Archive
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=claude
|
|
Group=claude
|
|
WorkingDirectory=<dir>/bambuddy
|
|
Environment="PATH=<dir/bambuddy/venv/bin"
|
|
|
|
# Force kill after 10 seconds if graceful shutdown fails
|
|
TimeoutStopSec=10
|
|
|
|
# Kill any zombie ffmpeg processes before starting/after stopping
|
|
ExecStartPre=-/usr/bin/pkill -9 ffmpeg
|
|
ExecStopPost=-/usr/bin/pkill -9 ffmpeg
|
|
|
|
# Ensure directories exist and have correct permissions before starting
|
|
# The + prefix runs the command as root even though User=claude
|
|
ExecStartPre=+/bin/mkdir -p <dir>/bambuddy/logs
|
|
ExecStartPre=+/bin/mkdir -p <dir>/bambuddy/archive
|
|
ExecStartPre=+/bin/chown -R <user>:<user> <dir>/bambuddy/logs
|
|
ExecStartPre=+/bin/chown -R <user>:<user> <dir>/bambuddy/archive
|
|
|
|
ExecStart=<dir>/bambuddy/venv/bin/uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|