projects
/
project
/
unetd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
486bc3b
)
unet-cli: fix defaults on create
author
Felix Fietkau
<nbd@nbd.name>
Mon, 16 Dec 2024 11:33:19 +0000
(12:33 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Mon, 16 Dec 2024 11:33:19 +0000
(12:33 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
scripts/unet-cli
patch
|
blob
|
history
diff --git
a/scripts/unet-cli
b/scripts/unet-cli
index 8cb790e1d93fa7dbaf4e4ca45cb8c0511b1c69eb..9cbe64f14bdcf35e44e71a3ca344dedb825afe99 100755
(executable)
--- a/
scripts/unet-cli
+++ b/
scripts/unet-cli
@@
-400,6
+400,9
@@
case 'import':
break;
case 'create':
case 'set-config':
+ for (let key, val in defaults)
+ args[key] ??= `${val}`;
+
set_fields(net_data.config, {
port: "int",
keepalive: "int",
@@
-407,9
+410,6
@@
case 'set-config':
set_field("int", net_data.config, "peer-exchange-port", args.pex_port);
set_field("array", net_data.config, "stun-servers", args.stun);
- for (let key, val in defaults)
- args[key] ??= `${val}`;
-
let seed_arg;
if ("seed" in args) {