From e5e4d84a68d257dbbba3f3421b842afc1d5d4051 Mon Sep 17 00:00:00 2001 From: Kristian Mika Date: Thu, 7 Dec 2023 23:59:07 +0100 Subject: [PATCH] fix: run vicc using bash + restart pcscd beforehand --- .../process_executor/linux_process_executor.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/process/process_executor/linux_process_executor.rs b/src-tauri/src/process/process_executor/linux_process_executor.rs index 0ca651d..96cca01 100644 --- a/src-tauri/src/process/process_executor/linux_process_executor.rs +++ b/src-tauri/src/process/process_executor/linux_process_executor.rs @@ -46,10 +46,14 @@ impl ProcessExecutor for LinuxProcessExecutor { } fn create_pcsc_process(&self) -> Result { - let pcsc_child = Command::new("sh") - .arg("vicc") - .arg("-t") - .arg("meesign") + let _ = Command::new("bash") + .arg("-c") + .arg("timeout 3 sudo systemctl restart pcscd") + .output()? + .status; + let pcsc_child = Command::new("bash") + .arg("-c") + .arg("vicc -t meesign") .spawn()?; debug!( "PC/SC process has been spawned with PID {}",