mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-31 08:36:16 +00:00
testminissdpd.sh: allow to specify the network interface on command line
This commit is contained in:
parent
6d6ae918e3
commit
78ab294de9
@ -1,12 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $Id: testminissdpd.sh,v 1.2 2015/09/03 18:31:25 nanard Exp $
|
# $Id: testminissdpd.sh,v 1.2 2015/09/03 18:31:25 nanard Exp $
|
||||||
# (c) 2015 Thomas Bernard
|
# (c) 2016 Thomas Bernard
|
||||||
|
|
||||||
OS=`uname -s`
|
OS=`uname -s`
|
||||||
IF=lo
|
IF=lo
|
||||||
if [ "$OS" = "Darwin" ] ; then
|
if [ "$OS" = "Darwin" ] ; then
|
||||||
IF=lo0
|
IF=lo0
|
||||||
fi
|
fi
|
||||||
|
# if set, 1st argument is network interface
|
||||||
|
if [ -n "$1" ] ; then
|
||||||
|
IF=$1
|
||||||
|
fi
|
||||||
SOCKET=`mktemp -t minissdpdsocketXXXXXX`
|
SOCKET=`mktemp -t minissdpdsocketXXXXXX`
|
||||||
PID="${SOCKET}.pid"
|
PID="${SOCKET}.pid"
|
||||||
./minissdpd -s $SOCKET -p $PID -i $IF || exit 1
|
./minissdpd -s $SOCKET -p $PID -i $IF || exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user