- 追加された行はこの色です。
- 削除された行はこの色です。
**Mobile DstarRepeater [#h14396ad]
HOMEにircDDBGatewayを置き、屋外でDstarRepeaterのみで運用するためのircDDBGateway側の設定。
+GIP変動に対応
Mobile回線でGIPが変化しても、ircDDBGatewayを追従させるスクリプト
---- ipget.sh ----
#!/bin/bash
while :
do
if [ ! -e /root/rpt_gip.txt ]; then
echo "192.168.50.175" > /root/rpt_gip.txt
fi
NDT=`tcpdump -i eth0 -nAs0 udp port 20014 -c1`
FL1=`echo "$NDT" | grep -e "20014 >"`
if test "$FL1" != ""; then
OGIP=`tail -1 /root/rpt_gip.txt`
NGIP=`echo $NDT | cut -d" " -f3 | cut -d"." -f1-4`
echo "GIP of Repeater = $NGIP"
if test "$OGIP" != "$NGIP"; then
echo "$NGIP" >> /root/rpt_gip.txt
PIRC=`pgrep -f ircddbgatewayd`
kill -9 $PIRC
sleep 2
/bin/sed -e "s/repeaterAddress4=.*$/repeaterAddress4=$NGIP/" /etc/ircddbgateway
> /etc/irc_new.txt
mv -f /etc/ircddbgateway /etc/ircddbgateway.bak
mv /etc/irc_new.txt /etc/ircddbgateway
/usr/local/bin/ircddbgatewayd &
fi
fi
sleep 23
pkill tcpdump
done
#clean
#comment
#navi(日記)