Fix systemd service to use python3 directly instead of uv
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>
This commit is contained in:
@@ -5,11 +5,11 @@ Wants=network.target sound.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=pi
|
||||
Group=pi
|
||||
WorkingDirectory=/home/pi/wedding-phone
|
||||
Environment="PATH=/home/pi/.local/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
ExecStart=/usr/bin/make start
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user