Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add systemd service file #75

Merged
merged 1 commit into from Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions contrib/systemd/ashuffle.service
@@ -0,0 +1,10 @@
[Unit]
Description=Shuffle service for mpd
Requires=mpd.service
After=mpd.service

[Service]
ExecStart=/usr/bin/ashuffle --tweak play-on-startup=no

[Install]
WantedBy=default.target
27 changes: 27 additions & 0 deletions contrib/systemd/readme.md
@@ -0,0 +1,27 @@
If your distributions package provides the service file, you can start the ashuffle service with:

$ systemctl --user start ashuffle.service

use systemctl enable to autostart ashuffle on every login:

$ systemctl --user enable ashuffle.service


If your installed package doesn't provide the service file, just copy it into your systemd user directory before using the above commands:

~/.config/systemd/user/ashuffle.service



To start the ashuffle service with parameters, use the systemctl edit command:

systemctl --user edit ashuffle.service

this creates and opens the file ~/.config/systemd/user/ashuffle.service.d/override.conf, insert something like this:
```
[Service]
ExecStart=
ExecStart=/usr/bin/ashuffle --only 10 --tweak play-on-startup=no
```

Note how ExecStart must be cleared before being re-assigned.