mirror of
https://codeberg.org/icewind/wifi-prometheus-exporter.git
synced 2026-06-03 16:44:11 +02:00
fix ip allow
This commit is contained in:
parent
a32915a466
commit
598144ee7d
2 changed files with 6 additions and 2 deletions
|
|
@ -116,7 +116,7 @@
|
|||
ProtectProc = "noaccess";
|
||||
SystemCallFilter = ["@system-service" "~@resources" "~@privileged"];
|
||||
IPAddressDeny = "any";
|
||||
IPAddressAllow = "192.168.0.0/16";
|
||||
IPAddressAllow = ["192.168.0.0/16" "localhost"];
|
||||
PrivateUsers = true;
|
||||
ProcSubset = "pid";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -87,9 +87,13 @@ async fn main() -> Result<(), MainError> {
|
|||
let mut mqtt_options = MqttOptions::new("wifi-exporter", host, 1883);
|
||||
mqtt_options.set_keep_alive(Duration::from_secs(5));
|
||||
mqtt_options.set_credentials(user, pass);
|
||||
println!("mqtt enabled");
|
||||
Some(mqtt_options)
|
||||
}
|
||||
_ => None,
|
||||
_ => {
|
||||
println!("mqtt disabled");
|
||||
None
|
||||
}
|
||||
};
|
||||
|
||||
if interfaces.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue