Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed Sep 15, 2024
1 parent 4bd19f0 commit bba8b22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/cmd/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ impl Profile {
}
Ok(res) => {
info!("found mountpoint generation {}", res);
if res > max {
max = res;
if res >= max {
max = res + 1;
}
}
}
Expand Down Expand Up @@ -144,8 +144,14 @@ impl Profile {
.expect("write decrypted file error")
});

let _ = fs::remove_file(self.get_decrypt_dir_path());
// link back to /run/vaultix
std::os::unix::fs::symlink(target_extract_dir_with_gen, self.get_decrypt_dir_path())
if std::os::unix::fs::symlink(target_extract_dir_with_gen, self.get_decrypt_dir_path())
.wrap_err("create symlink error")
.is_ok()
{
info!("deploy secrets success");
}
Ok(())
}
}
2 changes: 1 addition & 1 deletion src/cmd/stored_sec_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl StoredSecretPath {
debug!("identity hash: {}", ident_hash);

let mut storage_dir_path = PathBuf::from(storage_dir_store);
info!("storage dir path prefix: {:?}", storage_dir_path);
debug!("storage dir path prefix: {:?}", storage_dir_path);
storage_dir_path.push(format!("{}-{}.age", ident_hash, name));
storage_dir_path
};
Expand Down

0 comments on commit bba8b22

Please sign in to comment.