Annotation of embedaddon/miniupnpd/minissdpd/testminissdpd.sh, revision 1.1.1.1
1.1 misho 1: #!/bin/sh
2: # $Id: testminissdpd.sh,v 1.8 2017/04/21 11:57:59 nanard Exp $
3: # (c) 2017 Thomas Bernard
4:
5: OS=`uname -s`
6:
7: # if set, 1st argument is network interface
8: if [ -n "$1" ] ; then
9: IF=$1
10: else
11: case $OS in
12: *BSD | Darwin | SunOS)
13: IF=lo0
14: ;;
15: *)
16: IF=lo
17: ;;
18: esac
19: fi
20:
21: SOCKET=`mktemp -t minissdpdsocketXXXXXX`
22: PID="${SOCKET}.pid"
23: ./minissdpd -s $SOCKET -p $PID -i $IF || exit 1
24: ./testminissdpd -s $SOCKET || exit 2
25: kill `cat $PID`
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>