mirror of
https://github.com/darkclip/netlist.git
synced 2026-12-01 17:28:44 +08:00
update
This commit is contained in:
1 parent
f6ef87a6d5
commit
bbfcb1eb7f
3 files changed
+3
-3
No files matched your search
@@ -0,0 +1,21 @@
|
||||
|
||||
global $config, $argv, $command_split;
|
||||
|
||||
if (is_array($command_split)) {
|
||||
$args = array_slice($command_split, 2);
|
||||
} else {
|
||||
$args = array_slice($argv, 3);
|
||||
}
|
||||
|
||||
if (!isset($args[0]) || !isset($args[1]) || !isset($args[2])) {
|
||||
if (isset($args[0])){
|
||||
echo $config['installedpackages']['wireguard']['peers']['item'][$args[0]]['endpoint'] . ":" . $config['installedpackages']['wireguard']['peers']['item'][$args[0]]['port'];
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
echo $args[0] . " -> " . $args[1] . ":" . $args[2] . "\n";
|
||||
|
||||
$config['installedpackages']['wireguard']['peers']['item'][$args[0]]['endpoint'] = $args[1];
|
||||
$config['installedpackages']['wireguard']['peers']['item'][$args[0]]['port'] = $args[2];
|
||||
write_config("wireguard: endpoint changed");
|
||||
Reference in new issue
Block a user