miniupnp/minissdpd/testminissdpd.sh

15 lines
319 B
Bash
Raw Normal View History

2015-08-06 10:21:56 +00:00
#!/bin/sh
# $Id: testminissdpd.sh,v 1.2 2015/09/03 18:31:25 nanard Exp $
2015-08-06 10:21:56 +00:00
# (c) 2015 Thomas Bernard
OS=`uname -s`
2015-08-06 10:21:56 +00:00
IF=lo
if [ "$OS" = "Darwin" ] ; then
IF=lo0
fi
SOCKET=`mktemp -t minissdpdsocket`
2015-08-06 10:21:56 +00:00
PID="${SOCKET}.pid"
./minissdpd -s $SOCKET -p $PID -i $IF || exit 1
./testminissdpd -s $SOCKET || exit 2
kill `cat $PID`