# 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
[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
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,
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();