mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-09 08:48:27 +02:00
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:
38
src/initscripts/packages/mpd
Normal file
38
src/initscripts/packages/mpd
Normal 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
|
||||
Reference in New Issue
Block a user