Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: mpd with openrc (Read 1619 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

mpd with openrc

I installed mpd and mpd-runit. but there is no openrc service to start it.

How can I start mpd with openRC

Re: mpd with openrc

Reply #1
Just write OpenRC script basing on runit one. You just need to put that commands in start function (without --no-daemon option) and add some depend function
ARMtix


Re: mpd with openrc

Reply #3
Thank you guys.

first of I am still learning about these init script so please pardon advanced beginner questions

I found the script in a reddit post Here

with the systemd script

Code: [Select]
[Unit]
Description=Music Player Daemon
After=network.target sound.target

[Service]
User=mpd
ExecStart=/usr/bin/mpd --no-daemon
LimitRTPRIO=50
LimitRTTIME=-1
ControlGroup=cpu:/mpd
ControlGroupAttribute=cpu.rt_runtime_us 500000

[Install]
WantedBy=default.target

and the runit on

Code: [Select]
 
#!/bin/sh
 MPDCONF=/etc/mpd.conf
 exec mpd --stdout --no-daemon $MPDCONF

If I understand correctly it should look like.

Code: [Select]
#!/sbin/openrc-run
 
name=mpd
command="mpd --stdout  /home/{user}/.config/mpd/mpd.conf"


or

Code: [Select]
#!/sbin/openrc-run

command=/usr/bin/mpd
pidfile=

name="mpdSysd"
description="Music Player Daemon"


 is this correct and where does this file need to go? I believe it is supposed to go here

/etc/init.d



Re: mpd with openrc

Reply #4
Actually, Gentoo already has its own mpd initscript, so you don't need to convert systemd/runit service files to OpenRC ones.
now only the dinit guy in artix