mpd.initd 424 B

1234567891011121314151617181920212223
  1. #!/usr/bin/openrc-run
  2. supervisor=supervise-daemon
  3. name="Music Player Daemon"
  4. description="A daemon for playing music"
  5. command=/usr/bin/mpd
  6. command_args="$MPD_OPTS"
  7. command_args_foreground="--no-daemon"
  8. command_user="mpd:audio"
  9. depend() {
  10. need localmount
  11. use net netmount nfsmount esound pulseaudio
  12. after firewall
  13. }
  14. start_pre() {
  15. checkpath --directory --quiet \
  16. --owner "$command_user" --mode 0775 /var/run/mpd
  17. }