Add Ubuntu user service support
This commit is contained in:
parent
2b47db77eb
commit
0d61eb6311
5 changed files with 95 additions and 5 deletions
|
|
@ -10,6 +10,7 @@ This repo is a single Python script (`luz-musica.py`) that:
|
|||
- System dependency: `playerctl` must be installed and your player must expose MPRIS metadata.
|
||||
- Python deps: `requests`, `Pillow`.
|
||||
- Run: `python3 luz-musica.py`
|
||||
- Service install: `make install-service` creates and starts a `systemd --user` unit on Ubuntu.
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
|
@ -27,6 +28,12 @@ Create a venv and install Python deps:
|
|||
Then run:
|
||||
- `python luz-musica.py`
|
||||
|
||||
## Ubuntu service
|
||||
- The service is installed as `~/.config/systemd/user/music-light.service`.
|
||||
- The service loads optional environment overrides from `~/.config/music-light/env`.
|
||||
- Use `make status-service`, `make logs-service`, `make restart-service`, and `make uninstall-service`.
|
||||
- Keep it as a user service because `playerctl` needs access to the logged-in desktop user's MPRIS session.
|
||||
|
||||
## Configuration
|
||||
Edit constants at the top of `luz-musica.py`:
|
||||
- `HA_URL`, `HA_TOKEN`, `LIGHT_ENTITY`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue