mirror of
https://github.com/darkclip/netlist.git
synced 2026-11-12 05:05:32 +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;
|
||||
interface=$2;
|
||||
conf_num=$3;
|
||||
config=$3;
|
||||
|
||||
debug=false;
|
||||
|
||||
@@ -187,12 +187,14 @@ main(){
|
||||
if [ ! $interface ]; then
|
||||
exit 0;
|
||||
fi;
|
||||
if [ ! $conf_num ]; then
|
||||
if [ ! $config ]; then
|
||||
exit 0;
|
||||
fi;
|
||||
endpoint=$(wg show $interface endpoints | awk '{print $2}');
|
||||
if [ $(pfSsh.php playback chgwgpeer $conf_num) != $endpoint ]; then
|
||||
pfSsh.php playback chgwgpeer $conf_num $(echo $endpoint|awk -F: '{print $1}') $(echo $endpoint|awk -F: '{print $2}') || true;
|
||||
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;
|
||||
fi;
|
||||
fi;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user