sngrep: fix error if gnutls and openssl are both enabled
[buildroot-gz.git] / package / minissdpd / S50minissdpd
blob6235e06b8a6884b33381cc3e9752b17c2aefb4fd
1 #!/bin/sh
3 NAME=minissdpd
4 PIDFILE=/var/run/$NAME.pid
5 DAEMON=/usr/sbin/$NAME
6 CFGFILE=/etc/default/$NAME
8 IFACE=eth0
10 # Read configuration variable file if it is present
11 if [ -f $CFGFILE ]; then
12 . $CFGFILE
15 DAEMON_ARGS="-i $IFACE"
17 start() {
18 printf "Starting $NAME: "
19 start-stop-daemon -S -q -m -b -p $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
20 [ $? = 0 ] && echo "OK" || echo "FAIL"
22 stop() {
23 printf "Stopping $NAME: "
24 start-stop-daemon -K -q -p $PIDFILE
25 [ $? = 0 ] && echo "OK" || echo "FAIL"
27 restart() {
28 stop
29 start
32 case "$1" in
33 start)
34 start
36 stop)
37 stop
39 restart|reload)
40 restart
43 echo "Usage: $0 {start|stop|restart}"
44 exit 1
45 esac
47 exit $?