buildroot/package/minissdpd/S50minissdpd
Fabrice Fontaine 0340ce3cb7 minissdpd: new package
SSDP managing daemon.
Designed to work with miniupnpc, miniupnpd, minidlna, etc.

http://miniupnp.free.fr/

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
[Thomas:
 - remove patch for _GNU_SOURCE, pass it from the .mk file instead
 - add dependency on BR2_USE_MMU, fork() is used.
 - rename $IF variable in init script/systemd unit file to $IFACE, for
   clarity.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-30 17:00:25 +02:00

48 lines
685 B
Bash

#!/bin/sh
NAME=minissdpd
PIDFILE=/var/run/$NAME.pid
DAEMON=/usr/sbin/$NAME
CFGFILE=/etc/default/$NAME
IFACE=eth0
# Read configuration variable file if it is present
if [ -f $CFGFILE ]; then
. $CFGFILE
fi
DAEMON_ARGS="-i $IFACE"
start() {
printf "Starting $NAME: "
start-stop-daemon -S -q -m -b -p $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping $NAME: "
start-stop-daemon -K -q -p $PIDFILE
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?