mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-02-03 14:30:50 +03:00
feat: (yet again) updated telemetry disabling
This commit is contained in:
parent
1cb1f045c0
commit
40d0b8a399
1 changed files with 6 additions and 6 deletions
|
@ -16,22 +16,22 @@ pub fn disable_telemetry(sender: ComponentSender<App>) {
|
|||
let telemetry = config.launcher.edition
|
||||
.telemetry_servers()
|
||||
.iter()
|
||||
.map(|server| format!("0.0.0.0 {server}"))
|
||||
.map(|server| format!("echo '0.0.0.0 {server}' >> /etc/hosts"))
|
||||
.collect::<Vec<String>>()
|
||||
.join("\\n");
|
||||
.join(" ; ");
|
||||
|
||||
let output = if config.patch.root {
|
||||
Command::new("pkexec")
|
||||
.arg("sh")
|
||||
.arg("bash")
|
||||
.arg("-c")
|
||||
.arg(format!("echo -e \"\\n{telemetry}\\n\" >> /etc/hosts"))
|
||||
.arg(telemetry)
|
||||
.spawn()
|
||||
}
|
||||
|
||||
else {
|
||||
Command::new("sh")
|
||||
Command::new("bash")
|
||||
.arg("-c")
|
||||
.arg(format!("echo -e \"\\n{telemetry}\\n\" >> /etc/hosts"))
|
||||
.arg(telemetry)
|
||||
.spawn()
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue