kumquat-buildroot/package/upmpdcli/S99upmpdcli
Joerg Krause 6038144652 upmpdcli: new package
[Thomas:
 - add package to package/Config.in
 - add missing dependencies on thread and largefile, inherited from
   libupnp. Noticed by Yann E. Morin.
 - add installation of default configuration file. Noticed by Yann
   E. Morin.
 - fix the license, it's not GPLv2, but GPLv2+.
 - remove the colon in the user description, noticed by Yann E. Morin.
 - added a patch to fix build with uClibc.
 - fix the init script installation to use a full path as the target.]

Signed-off-by: Joerg Krause <jkrause@posteo.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-16 20:31:27 +02:00

41 lines
861 B
Bash

#!/bin/sh
NAME=upmpdcli
DAEMON=/usr/bin/$NAME
CONFFILE=/etc/$NAME.conf
PIDFILE=/var/run/$NAME.pid
DAEMON_ARGS="-D -c $CONFFILE"
# Sanity checks
test -f $DAEMON || exit 0
do_start() {
echo -n "Starting $NAME: "
start-stop-daemon --start --quiet --background --exec $DAEMON \
-- $DAEMON_ARGS \
&& echo "OK" || echo "FAIL"
}
do_stop() {
echo -n "Stopping $NAME: "
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
&& echo "OK" || echo "FAIL"
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
restart)
do_stop
sleep 1
do_start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac