summaryrefslogtreecommitdiff
path: root/mpd
diff options
context:
space:
mode:
authorThomas Penteker <tek@serverop.de>2016-07-19 01:13:34 +0200
committerThomas Penteker <tek@serverop.de>2016-07-19 01:13:34 +0200
commit06046212f3677113237e439c5d0e7f0583356e4b (patch)
tree9156c30d591ab3162d6cd5c6ef054eceacd3c898 /mpd
parente01c77976210f0122a006b142c98fc9d830cbd38 (diff)
downloadcontrib-06046212f3677113237e439c5d0e7f0583356e4b.tar.gz
contrib-06046212f3677113237e439c5d0e7f0583356e4b.tar.xz
mpd: include onoderas rc script
Diffstat (limited to 'mpd')
-rw-r--r--mpd/.footprint2
-rw-r--r--mpd/.md5sum1
-rw-r--r--mpd/Pkgfile3
-rw-r--r--mpd/mpd35
4 files changed, 40 insertions, 1 deletions
diff --git a/mpd/.footprint b/mpd/.footprint
index 3e9475bfb..f8923e863 100644
--- a/mpd/.footprint
+++ b/mpd/.footprint
@@ -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
diff --git a/mpd/.md5sum b/mpd/.md5sum
index faf5e6164..3287384af 100644
--- a/mpd/.md5sum
+++ b/mpd/.md5sum
@@ -1 +1,2 @@
+2f5c3f15990e1d1c16927b3be2f9476c mpd
47e13f3f160bf94e7a897c5a48990f3d mpd-0.19.17.tar.xz
diff --git a/mpd/Pkgfile b/mpd/Pkgfile
index d2ee35bb3..08578f400 100644
--- a/mpd/Pkgfile
+++ b/mpd/Pkgfile
@@ -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
}
diff --git a/mpd/mpd b/mpd/mpd
new file mode 100644
index 000000000..41ea415e2
--- /dev/null
+++ b/mpd/mpd
@@ -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

Generated by cgit