From: Greg Burri Date: Tue, 13 Jul 2021 18:19:18 +0000 (+0200) Subject: Do not display api_key in the log. X-Git-Url: https://git.euphorik.ch/?a=commitdiff_plain;h=52284b0325bfc45c902884c0c3633d8147767941;p=gandi_dns_update.git Do not display api_key in the log. --- diff --git a/deploy.ps1 b/deploy.ps1 old mode 100644 new mode 100755 index eb1a5ea..19ff7e9 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -22,7 +22,7 @@ Copy-Item target/release/gandi_dns_update -Destination $destination # Do not overwrite the configuration. if (!(Test-Path -Path $destination/config.ron)) { - Copy-Item backend/config.ron -Destination $destination + Copy-Item config.ron -Destination $destination } systemctl --user start gandi_dns_update diff --git a/doc/gandi_dns_update.service b/doc/gandi_dns_update.service index ed32e27..e08f7f3 100644 --- a/doc/gandi_dns_update.service +++ b/doc/gandi_dns_update.service @@ -3,7 +3,7 @@ Description=gandi_dns_update [Service] WorkingDirectory=/var/lib/gandi_dns_update -ExecStart=/var/lib/gandi_dns_update +ExecStart=/var/lib/gandi_dns_update/gandi_dns_update SyslogIdentifier=gandi_dns_update Restart=always RestartSec=10 diff --git a/src/main.rs b/src/main.rs index 3c3b4f5..2a9b5e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,7 +32,7 @@ impl std::fmt::Display for Error { impl std::error::Error for Error { } -#[derive(Debug, Deserialize, Serialize)] +#[derive(Debug, Clone, Deserialize, Serialize)] struct Config { delay_between_check: time::Duration, api_key: String, @@ -68,7 +68,7 @@ fn main() -> Result<()> { let config = Config::read(FILE_CONF)?; - println!("Configuration: {:?}", config); + println!("Configuration: {:?}", Config { api_key: String::from("*****"), ..config.clone() }); loop { let time_beginning_loop = time::Instant::now();