mpd: move initscript to src/initscripts/packages and use new macro

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
This commit is contained in:
Jonatan Schlag
2017-03-01 13:11:59 +01:00
parent 89760da442
commit 896209f6f1
2 changed files with 4 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
#!/bin/sh
# Begin $rc_base/init.d/mpd
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
# ALSA specific parts by Mark Hymers - markh@linuxfromscratch.org
# Stores mixer settings in the default location: /etc/asound.state
. /etc/sysconfig/rc
. $rc_functions
case "$1" in
start)
boot_mesg "Starting MPD..."
chown -R root.nobody /var/ipfire/mpfire/db
/bin/nice --5 /usr/bin/mpd
evaluate_retval
;;
stop)
boot_mesg "Stopping MPD..."
/usr/bin/mpd --kill
evaluate_retval
;;
status)
statusproc /usr/bin/mpd
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: $0 (start|stop|restart|status)"
exit 1
;;
esac
# End $rc_base/init.d/alsa