File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / miniupnpd / minissdpd / testminissdpd.sh
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Sep 27 11:25:11 2023 UTC (14 months, 4 weeks ago) by misho
Branches: miniupnpd, MAIN
CVS tags: v2_3_3p0, HEAD
Version 2.3.3p0

#!/bin/sh
# $Id: testminissdpd.sh,v 1.1.1.1 2023/09/27 11:25:11 misho Exp $
# (c) 2017 Thomas Bernard

OS=`uname -s`

# if set, 1st argument is network interface
if [ -n "$1" ] ; then
	IF=$1
else
	case $OS in
		*BSD | Darwin | SunOS)
			IF=lo0
			;;
		*)
			IF=lo
			;;
	esac
fi

SOCKET=`mktemp -t minissdpdsocketXXXXXX`
PID="${SOCKET}.pid"
./minissdpd -s $SOCKET -p $PID -i $IF  || exit 1
./testminissdpd -s $SOCKET || exit 2
kill `cat $PID`

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>