Mobile DstarRepeater

HOMEにircDDBGatewayを置き、屋外でDstarRepeaterのみで運用するためのircDDBGateway側の設定。

  1. 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


URL B I U SIZE Black Maroon Green Olive Navy Purple Teal Gray Silver Red Lime Yellow Blue Fuchsia Aqua White


リロード   新規 下位ページ作成 凍結解除 差分 コピー 名前変更   ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS