]>
Commit | Line | Data |
---|---|---|
9a6214e0 CS |
1 | #!/bin/sh |
2 | # Begin $rc_base/init.d/mpd | |
3 | ||
4 | # Based on sysklogd script from LFS-3.1 and earlier. | |
5 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org | |
6 | # ALSA specific parts by Mark Hymers - markh@linuxfromscratch.org | |
7 | # Stores mixer settings in the default location: /etc/asound.state | |
8 | ||
9 | . /etc/sysconfig/rc | |
10 | . $rc_functions | |
11 | ||
12 | case "$1" in | |
13 | start) | |
14 | boot_mesg "Starting MPD..." | |
e98aa5c2 | 15 | chown -R root.nobody /var/ipfire/mpfire/db |
6cd3f682 | 16 | /bin/nice --5 /usr/bin/mpd |
9a6214e0 CS |
17 | evaluate_retval |
18 | ;; | |
19 | stop) | |
20 | boot_mesg "Stopping MPD..." | |
21 | /usr/bin/mpd --kill | |
22 | evaluate_retval | |
23 | ;; | |
24 | status) | |
25 | statusproc /usr/bin/mpd | |
26 | ;; | |
dc64838a MT |
27 | restart) |
28 | $0 stop | |
29 | sleep 3 | |
30 | $0 start | |
31 | ;; | |
9a6214e0 | 32 | *) |
dc64838a | 33 | echo "Usage: $0 (start|stop|restart|status)" |
9a6214e0 CS |
34 | exit 1 |
35 | ;; | |
36 | esac | |
37 | ||
38 | # End $rc_base/init.d/alsa |