08/09/06 12:25:09 Vps/Jomb
>>302
#!/bin/sh
# friiomcast.sh: friio用垂れ流しサーバ
name="${0##*/}"; usage="${name} device [mcast-address [udp-port]]"
if [ 0 -eq "$#" ]; then
echo 1>&2 "usage: ${usage}"
exit 1
fi
dev="$1"; addr="${2:-239.0.0.1}"; port="${3:-9999}"
tmpdir="$(mktemp -t -d "${name}.XXXXXX")"
if ! cd "${tmpdir}"; then
echo 1>&2 "${name}: failed to create tmpdir"
exit 2
fi
pids=
trap '[ -n "${pids}" ] && kill ${pids}; sleep 2; cd .. && rm -rf "${tmpdir}";' 0
if ! mkfifo recout b25out; then
echo 1>&2 "${name}: failed to create fifo"
exit 3
fi
recfriio 32 99999 recout 2>&1 >/dev/null & pids="${pids}$! "
b25 -v 0 recout b25out 2>&1 >/dev/null & pids="${pids}$! "
socat b25out UDP4-DATAGRAM:"${addr}:${port}",bind=:"${port}",ip-add-membership="${addr}:${dev}"
書き下ろしスクリプトなんだぜ?だから動くかどうかは知らんw