30 lines
882 B
Bash
30 lines
882 B
Bash
#!/bin/bash
|
|
|
|
cd
|
|
git clone https://git.nia.ink/brnet/bird_config.git
|
|
|
|
rm /etc/bird/filter -rf
|
|
mv ./bird_config/bird/filter /etc/bird/filter
|
|
|
|
rm /etc/bird/function -rf
|
|
mv ./bird_config/bird/function /etc/bird/function
|
|
|
|
rm /etc/bird/template -rf
|
|
mv ./bird_config/bird/template /etc/bird/template
|
|
|
|
mv /etc/bird/whitelist/ipconfig.conf /etc/bird/whitelist/ipconfig.conf.bak
|
|
rm /etc/bird/whitelist/*.conf -rf
|
|
mv /etc/bird/whitelist/ipconfig.conf.bak /etc/bird/whitelist/ipconfig.conf
|
|
|
|
wget https://noc.zhuantou.com.cn/api/network.php?s=inet6-bird-function -O /etc/bird/whitelist/mynet_ipv6.conf
|
|
wget https://noc.zhuantou.com.cn/api/network.php?s=inet4-bird-function -O /etc/bird/whitelist/mynet_ipv4.conf
|
|
wget https://noc.zhuantou.com.cn/api/network.php?s=dn42-bird-function -O /etc/bird/whitelist/mynet_dn42.conf
|
|
|
|
chmod -R 755 /etc/bird
|
|
|
|
birdc c
|
|
cd
|
|
rm -rf bird_config
|
|
|
|
cd
|
|
rm update.sh |