wok view mpd/stuff/etc/init.d/mpd @ rev 14798
memtest: add license
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jul 13 14:32:56 2013 +0200 (2013-07-13) |
parents | 6b69e208e751 |
children | 8ebec64e4191 |
line source
1 #!/bin/sh
2 # /etc/init.d/mpd: Start, stop and restart mpd deamon on SliTaz, at boot
3 # time or with the command line.
4 #
5 # To start daemon at boot time, just put the right name in the $RUN_DAEMONS
6 # variable of /etc/rcS.conf and configure options with /etc/mpd.conf.
7 #
8 . /etc/init.d/rc.functions
10 NAME=mpd
11 DESC="Music Player Daemon"
12 DAEMON=/usr/sbin/mpd
13 OPTION="/etc/mpd.conf"
15 case "$1" in
16 start)
17 echo -n "Starting $DESC: $NAME... "
18 $DAEMON $OPTION 2> /dev/null
19 status
20 ;;
21 stop)
22 echo -n "Stopping $DESC: $NAME... "
23 $DAEMON --kill 2> /dev/null
24 status
25 ;;
26 restart)
27 echo -n "Restarting $DESC: $NAME... "
28 $DAEMON --kill 2> /dev/null
29 sleep 2
30 $DAEMON $OPTION 2> /dev/null
31 status
32 ;;
33 *)
34 echo ""
35 echo -e "\033[1mUsage:\033[0m /etc/init.d/$(basename $0) [start|stop|restart]"
36 echo ""
37 exit 1
38 ;;
39 esac
41 exit 0