From 52284b0325bfc45c902884c0c3633d8147767941 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Tue, 13 Jul 2021 20:19:18 +0200 Subject: [PATCH] Do not display api_key in the log. --- deploy.ps1 | 2 +- doc/gandi_dns_update.service | 2 +- src/main.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 deploy.ps1 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(); -- 2.45.2