4
0
mirror of https://github.com/darkclip/netlist.git synced 2026-11-10 23:37:28 +08:00
This commit is contained in:
darkclip 2024-01-02 04:00:32 +08:00
parent f6ef87a6d5
commit bbfcb1eb7f
3 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ jobs:
./netgen.py ref1/china6.txt -o target/wgcf-down.sh -p 'ip route del ' -s ' dev eth0 via fe80::6a77:24ff:fed6:809d || true'
./netgen.py private4.txt -o target/wgcf-down.sh -p 'ip route del ' -s ' dev eth0 via 10.11.0.1 || true'
./netgen.py private6.txt -o target/wgcf-down.sh -p 'ip route del ' -s ' dev eth0 via fe80::6a77:24ff:fed6:809d || true'
cp cf-watch.sh target/
cp wg-watch.sh target/
cd target
chmod +x *.sh
tar -cf sha.tar *.sh

View File

@ -206,8 +206,8 @@ main(){
fi;
endpoint=$(wg show $INTERFACE endpoints | awk '{print $2}');
if [ "$(uname -i)" = 'pfSense' ]; then
if [ $(pfSsh.php playback chgwgpeer $CONFIG) != $endpoint ]; then
pfSsh.php playback chgwgpeer $CONFIG $(echo $endpoint|awk -F: '{print $1}') $(echo $endpoint|awk -F: '{print $2}') || true;
if [ $(pfSsh.php playback wgpeer $CONFIG) != $endpoint ]; then
pfSsh.php playback wgpeer $CONFIG $(echo $endpoint|awk -F: '{print $1}') $(echo $endpoint|awk -F: '{print $2}') || true;
fi;
else
sed -i -r 's/Endpoint =.*/Endpoint = '$endpoint'/' $CONFIG

View File