fix i2p path for create_tunnel()

This commit is contained in:
creating2morrow 2023-04-30 12:17:32 -04:00
parent df571e45b0
commit ea6b8e9154

View file

@ -93,7 +93,9 @@ pub async fn start() {
fn create_tunnel() { fn create_tunnel() {
info!("creating tunnel"); info!("creating tunnel");
let output = Command::new("./i2p-zero-linux.v1.20/router/bin/tunnel-control.sh") let args = args::Args::parse();
let path = args.i2p_zero_dir;
let output = Command::new(format!("{}/router/bin/tunnel-control.sh", path))
.args(["server.create", "127.0.0.1", &format!("{}",utils::get_app_port())]) .args(["server.create", "127.0.0.1", &format!("{}",utils::get_app_port())])
.spawn() .spawn()
.expect("i2p-zero failed to create a tunnel"); .expect("i2p-zero failed to create a tunnel");