Changed service to run python3 directly instead of 'make start' to avoid dependency on uv being installed system-wide. Service file changes: - ExecStart: /usr/bin/python3 rotary_phone_web.py (instead of make) - User/Group: berwn (match actual user, not hardcoded pi) - WorkingDirectory: /home/berwn/wedding-phone - PATH includes user's .local/bin for any user-installed packages Install script improvements: - Automatically substitutes correct username - Substitutes correct home directory in PATH - Substitutes correct working directory - More robust sed replacements with proper escaping This fixes the error: make: uv: No such file or directory make: *** [Makefile:8: start] Error 127 Now the service works regardless of whether uv is installed, as it uses system python3 which is always available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
522 B
Desktop File
25 lines
522 B
Desktop File
[Unit]
|
|
Description=Wedding Phone - Vintage Rotary Phone Audio System
|
|
After=network.target sound.target
|
|
Wants=network.target sound.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=berwn
|
|
Group=berwn
|
|
WorkingDirectory=/home/berwn/wedding-phone
|
|
Environment="PATH=/home/berwn/.local/bin:/usr/local/bin:/usr/bin:/bin"
|
|
ExecStart=/usr/bin/python3 rotary_phone_web.py
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
# Security hardening
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
|
|
# Allow GPIO access
|
|
SupplementaryGroups=gpio audio
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|