Skip to content

Commit

Permalink
add an example of a systemd unit
Browse files Browse the repository at this point in the history
  • Loading branch information
jecaro committed Nov 13, 2023
1 parent a4521d2 commit 9658e74
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,31 @@ $ mprisqueeze -- squeezelite -f ./squeezelite.log -n {name} -s {server}
Note that when using a custom command, both parameters must be present on the
command line: `{name}` and `{server}`.

`mprisqueeze` can be automatically started on login. The most convenient way of
doing that is using a user systemd unit. For example, one can set a unit called
`mprisqueeze` in the file `~/.config/systemd/user/mprisqueeze.service`:

```systemd
[Install]
WantedBy=default.target
[Service]
ExecStart=mprisqueeze -- squeezelite-pulse -n {name} -s {server}
Restart=always
RestartSec=3
Type=simple
[Unit]
Description=mprisqueeze
```

On the next login, `mprisqueeze` will be automatically started. Otherwise, to
start it manually:

```bash
$ systemctl --user start mprisqueeze
```

[status]: https://github.com/jecaro/mprisqueeze/actions
[status-png]: https://github.com/jecaro/mprisqueeze/workflows/CI/badge.svg
[MPRIS]: https://specifications.freedesktop.org/mpris-spec/latest/
Expand Down

0 comments on commit 9658e74

Please sign in to comment.