summaryrefslogtreecommitdiffstats
path: root/mpd/mpd
blob: 76d4192c67e721bbf0a27e86afb3cb7730b6bf84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# Begin $rc_base/init.d/mpd

. /etc/sysconfig/rc
. $rc_functions

pidfile=/var/run/mpd.pid

case "$1" in
	start)
		boot_mesg " Lancement de MPD..."
		loadproc mpd
		;;

	stop)
		boot_mesg "Arret de MPD..."
		if [ -f $pidfile ]; then
		loadkill mpd
		fi
		;;

	restart)
		boot_mesg "Relancement de MPD..."
		if [ -f $pidfile ]; then
			loadproc mpd stop
			loadproc mpd
		fi
		;;

	*)
		echo "Usage: $0 {start|stop|restart}"
		exit 1
		;;
esac

# End $rc_base/init.d/mpd