File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / miniupnpd / minissdpd / testminissdpdnotif.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

    1: #!/bin/sh
    2: # $Id: testminissdpdnotif.sh,v 1.1.1.1 2023/09/27 11:25:11 misho Exp $
    3: # (c) 2019 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: # trap sigint in the script so CTRL-C interrupts the running program,
   22: # not the script
   23: trap 'echo SIGINT' INT
   24: 
   25: SOCKET=`mktemp -t minissdpdsocketXXXXXX`
   26: PID="${SOCKET}.pid"
   27: ./minissdpd -s $SOCKET -p $PID -i $IF  || exit 1
   28: sleep .5
   29: echo "minissdpd process id `cat $PID`"
   30: ./showminissdpdnotif -s $SOCKET
   31: echo "showminissdpdnotif returned $?"
   32: kill `cat $PID`

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