minissdpd/testminissdpd.sh: fix to work with OS X

This commit is contained in:
Thomas Bernard 2015-09-04 18:24:39 +02:00
parent 15e7285c2a
commit eb9098d7ac
1 changed files with 6 additions and 2 deletions

View File

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