Compare commits
3 commits
68af29f765
...
8de12c45cf
Author | SHA1 | Date | |
---|---|---|---|
8de12c45cf | |||
f00b7d0133 | |||
9716019cfb |
3 changed files with 13 additions and 2 deletions
9
Cargo.lock
generated
9
Cargo.lock
generated
|
@ -288,13 +288,20 @@ version = "1.0.17"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
|
checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sd-notify"
|
||||||
|
version = "0.4.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4646d6f919800cd25c50edb49438a1381e2cd4833c027e75e8897981c50b8b5e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "secrets-file-builder"
|
name = "secrets-file-builder"
|
||||||
version = "0.3.0"
|
version = "0.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
"handlebars",
|
"handlebars",
|
||||||
|
"sd-notify",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"url-escape",
|
"url-escape",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "secrets-file-builder"
|
name = "secrets-file-builder"
|
||||||
version = "0.3.0"
|
version = "0.4.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["networkException <git@nwex.de>"]
|
authors = ["networkException <git@nwex.de>"]
|
||||||
license = "BSD-2-Clause"
|
license = "BSD-2-Clause"
|
||||||
|
@ -12,5 +12,6 @@ repository = "https://git.nwex.de/networkException/secrets-file-builder"
|
||||||
anyhow = "1.0.88"
|
anyhow = "1.0.88"
|
||||||
clap = { version = "4.5.17", features = ["derive"] }
|
clap = { version = "4.5.17", features = ["derive"] }
|
||||||
handlebars = "5.1.0"
|
handlebars = "5.1.0"
|
||||||
|
sd-notify = "0.4.2"
|
||||||
serde_json = "1.0.114"
|
serde_json = "1.0.114"
|
||||||
url-escape = "0.1.1"
|
url-escape = "0.1.1"
|
||||||
|
|
|
@ -6,6 +6,7 @@ use std::thread;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
use sd_notify::NotifyState;
|
||||||
use serde_json::{Map, Value};
|
use serde_json::{Map, Value};
|
||||||
use url_escape;
|
use url_escape;
|
||||||
|
|
||||||
|
@ -98,6 +99,8 @@ fn main() -> Result<()> {
|
||||||
fs::write(&output_path, output)
|
fs::write(&output_path, output)
|
||||||
.expect(format!("To be able to write to '{}'", output_path.to_string_lossy()).as_str());
|
.expect(format!("To be able to write to '{}'", output_path.to_string_lossy()).as_str());
|
||||||
|
|
||||||
|
sd_notify::notify(true, &[NotifyState::Ready])?;
|
||||||
|
|
||||||
if idle {
|
if idle {
|
||||||
loop {
|
loop {
|
||||||
thread::park();
|
thread::park();
|
||||||
|
|
Loading…
Reference in a new issue