mirror of
https://github.com/darkclip/netlist.git
synced 2026-12-02 00:08:53 +08:00
update
This commit is contained in:
1 parent
2f9853cab6
commit
0182b2066f
1 file changed
+10
-7
+10
-7
@@ -231,13 +231,16 @@ main(){
|
|||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
endpoint=$(wg show $INTERFACE endpoints | awk '{print $2}');
|
endpoint=$(wg show $INTERFACE endpoints | awk '{print $2}');
|
||||||
if [ $(uname -i) = 'pfSense' ]; then
|
case $(uname -i) in
|
||||||
if [ $(pfSsh.php playback wgpeer $CONFIG) != $endpoint ]; then
|
pfSense)
|
||||||
pfSsh.php playback wgpeer $CONFIG $(echo $endpoint|awk -F: '{print $1}') $(echo $endpoint|awk -F: '{print $2}') || true;
|
if [ $(pfSsh.php playback wgpeer $CONFIG) != $endpoint ]; then
|
||||||
fi;
|
pfSsh.php playback wgpeer $CONFIG $(echo $endpoint|awk -F: '{print $1}') $(echo $endpoint|awk -F: '{print $2}') || true;
|
||||||
else
|
fi;
|
||||||
sed -i -r 's/Endpoint =.*/Endpoint = '$endpoint'/' $CONFIG;
|
;;
|
||||||
fi;
|
*)
|
||||||
|
sed -i -r 's/Endpoint =.*/Endpoint = '$endpoint'/' $CONFIG;
|
||||||
|
;;
|
||||||
|
esac;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user