Do not display api_key in the log.
authorGreg Burri <greg.burri@gmail.com>
Tue, 13 Jul 2021 18:19:18 +0000 (20:19 +0200)
committerGreg Burri <greg.burri@gmail.com>
Tue, 13 Jul 2021 18:19:18 +0000 (20:19 +0200)
deploy.ps1 [changed mode: 0644->0755]
doc/gandi_dns_update.service
src/main.rs

old mode 100644 (file)
new mode 100755 (executable)
index eb1a5ea..19ff7e9
@@ -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
index ed32e27..e08f7f3 100644 (file)
@@ -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
index 3c3b4f5..2a9b5e4 100644 (file)
@@ -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();