From 15c3fc2a40a699512a1334df4d40ba25f9bba2b4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 17 Dec 2023 16:50:14 +0000 Subject: media-sound/mpd : fix build with media-video/ffmpeg-6.1 --- media-sound/mpd/files/mpd-0.21.4.init | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 media-sound/mpd/files/mpd-0.21.4.init (limited to 'media-sound/mpd/files/mpd-0.21.4.init') diff --git a/media-sound/mpd/files/mpd-0.21.4.init b/media-sound/mpd/files/mpd-0.21.4.init new file mode 100644 index 00000000..72fede85 --- /dev/null +++ b/media-sound/mpd/files/mpd-0.21.4.init @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: CFGFILE=${CFGFILE:=/etc/mpd.conf} + +depend() { + need localmount + use net netmount nfsmount alsasound esound pulseaudio + config ${CFGFILE} +} + +get_config() { + x=$1 + test -e ${CFGFILE} || return 1 + sed -n \ + -e '/^[ \t]*'${x}'/{s:^[ \t]*'${x}'[ \t]\+"\?\([^#"]\+\)[^"]*"\?$:\1: ; p }' \ + ${CFGFILE} +} + +extra_started_commands='reload' +# Required by io_uring +rc_ulimit="-l 65535" +command=/usr/bin/mpd +command_args=${CFGFILE} +required_files=${CFGFILE} +pidfile=$(get_config pid_file) +description="Music Player Daemon" + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --pidfile ${pidfile} --signal HUP + eend $? + } -- cgit v1.2.3