File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## v3.6.1
2+
3+ 1 ) В скрипте установки переделана команда для вывода сетевых интерфейсов
4+ 2 ) Так же в скрипте установки переделано определение ip маршрутизатора
5+
16## v3.6.0
27
380 ) Появился BGP режим!
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- VERSION=" v3.6.0 "
3+ VERSION=" v3.6.1 "
44
55while true ; do
66 echo -e " \nBegin install? y/n"
100100
101101# Reading vpn and provider interfaces, replacing in scripts and bird configuration
102102echo -e " \n----------------------"
103- ifconfig | grep -B 1 " inet " | awk ' {print $1,$2} ' | sed ' :a;N;$!ba;s/\n//g;s/\--/\n/g ' | awk ' {print $1,$ (NF)}'
103+ ip addr show | awk -F " |/ " ' {gsub(/^ +/,"")}/inet / {print $(NF), $2 }'
104104
105105echo " Enter the name of the provider interface from the list above (for exaple ppp0 or eth3)"
106106read ISP
107107sed -i ' s/ISPINPUT/' $ISP ' /' $SCRIPTS /* .sh
108+ ISP_IP=$( ip addr show | awk -F" |/" ' {gsub(/^ +/,"")}/inet /{print $(NF), $2}' | grep " $ISP " | awk ' {print $2}' )
109+ if [[ $ISP_IP =~ ^\( [0-9]{1,3}\.\) {3}[0-9]{1,3}$ ]]; then echo " Your id is $ISP_IP " ; else ISP_IP=" 123.123.123.123" ; fi
108110
109111echo " Enter the VPN interface name from the list above (for exaple ovpn_br0 or nwg0)"
110112read VPN1
@@ -119,7 +121,7 @@ if [ "$CONF" == "2" ]; then
119121fi
120122
121123sed -i ' s/HOMEFOLDERINPUT/' $HOME_FOLDER_SED ' /; s/SYSTEMFOLDERINPUT/' $SYSTEM_FOLDER_SED ' /' $SCRIPTS /* .sh
122- id= $( ip route | awk ' /^default/{print $3} ' ) && sed -i ' s/IDINPUT/' $id ' /' $SYSTEM_FOLDER /etc/bird4.conf
124+ sed -i ' s/IDINPUT/' $ISP_IP ' /' $SYSTEM_FOLDER /etc/bird4.conf
123125
124126# Organizing scripts into folders
125127ln -sf $SCRIPTS /bird-table.sh $SYSTEM_FOLDER /etc/init.d/S02bird-table
You can’t perform that action at this time.
0 commit comments