summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 05:31:10 +0100
committertv <tv@krebsco.de>2026-10-26 05:31:10 +0100
commitc14ee0a0aa4e897a2c9fd7706d3df2255da12a1a (patch)
treebd7caf24c99469ac3b4e0c03e5ffc4747c935d8b /src/config
parentaf53e0dee3e1c38c907b92733239b1cca448e0b0 (diff)
private mycelium needs both key and name
Diffstat (limited to 'src/config')
-rw-r--r--src/config/mod.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index b8a2ba0..4222212 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -227,14 +227,14 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[
Kind::Text,
"PATH",
None,
- "Key of a private Mycelium network for the supervised daemon.",
+ "Key of a private Mycelium network for the supervised daemon (with mycelium-network-name).",
),
option(
"mycelium-network-name",
Kind::Text,
"NAME",
None,
- "Name of that private Mycelium network.",
+ "Name of that private Mycelium network (with mycelium-network-key-file).",
),
option(
"mycelium-tcp-listen-port",
@@ -378,6 +378,10 @@ impl Settings {
);
}
}
+ // A private network has both; one alone would be ignored or invented.
+ if self.mycelium_network_key_file.is_some() != self.mycelium_network_name.is_some() {
+ bail!("mycelium-network-key-file and mycelium-network-name go together");
+ }
crate::force::Force::parse(self.force.iter().map(String::as_str), FORCE)
.map_err(|reason| anyhow!("force: {reason}"))?;
// Contradictions, not overrides: an error wherever the options come from.