mpd: include onoderas rc script
This commit is contained in:
parent
e01c779762
commit
06046212f3
@ -1,5 +1,7 @@
|
||||
drwxr-xr-x root/root etc/
|
||||
-rw-r--r-- root/root etc/mpd.conf
|
||||
drwxr-xr-x root/root etc/rc.d/
|
||||
-rwxr-xr-x root/root etc/rc.d/mpd
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr-xr-x root/root usr/bin/mpd
|
||||
|
@ -1 +1,2 @@
|
||||
2f5c3f15990e1d1c16927b3be2f9476c mpd
|
||||
47e13f3f160bf94e7a897c5a48990f3d mpd-0.19.17.tar.xz
|
||||
|
@ -8,7 +8,7 @@
|
||||
name=mpd
|
||||
version=0.19.17
|
||||
release=1
|
||||
source=(http://www.musicpd.org/download/mpd/0.19/$name-$version.tar.xz)
|
||||
source=(http://www.musicpd.org/download/mpd/0.19/$name-$version.tar.xz mpd)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
@ -23,6 +23,7 @@ build() {
|
||||
|
||||
mkdir -p $PKG/etc
|
||||
install -m 0644 doc/mpdconf.example $PKG/etc/mpd.conf
|
||||
install -D $SRC/mpd $PKG/etc/rc.d/mpd
|
||||
|
||||
rm -rf $PKG/usr/share
|
||||
}
|
||||
|
35
mpd/mpd
Normal file
35
mpd/mpd
Normal file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/mpd: start/stop mpd daemon
|
||||
#
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/bin/mpd
|
||||
OPTS=""
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
$SSD --start --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop --retry 10 --exec $PROG
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status --exec $PROG
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(pidof $PROG)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
# End of file
|
Loading…
x
Reference in New Issue
Block a user