mirror of
https://github.com/darkclip/netlist.git
synced 2026-12-05 05:38:42 +08:00
update
This commit is contained in:
1 parent
b924a7f65d
commit
6e897e86bd
1 file changed
+6
-4
+6
-4
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
family=$1;
|
family=$1;
|
||||||
interface=$2;
|
interface=$2;
|
||||||
conf_num=$3;
|
config=$3;
|
||||||
|
|
||||||
debug=false;
|
debug=false;
|
||||||
|
|
||||||
@@ -187,12 +187,14 @@ main(){
|
|||||||
if [ ! $interface ]; then
|
if [ ! $interface ]; then
|
||||||
exit 0;
|
exit 0;
|
||||||
fi;
|
fi;
|
||||||
if [ ! $conf_num ]; then
|
if [ ! $config ]; then
|
||||||
exit 0;
|
exit 0;
|
||||||
fi;
|
fi;
|
||||||
endpoint=$(wg show $interface endpoints | awk '{print $2}');
|
endpoint=$(wg show $interface endpoints | awk '{print $2}');
|
||||||
if [ $(pfSsh.php playback chgwgpeer $conf_num) != $endpoint ]; then
|
if [ $(uname -i) == 'pfSense' ]; then
|
||||||
pfSsh.php playback chgwgpeer $conf_num $(echo $endpoint|awk -F: '{print $1}') $(echo $endpoint|awk -F: '{print $2}') || true;
|
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;
|
||||||
|
fi;
|
||||||
fi;
|
fi;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user