From: Greg Burri Date: Fri, 29 Sep 2023 19:06:31 +0000 (+0200) Subject: Hide smtp password when printing the configuration X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=507c694cf6672969f9003324a4783c91bf31f764;p=stakingWatchdog.git Hide smtp password when printing the configuration --- diff --git a/deploy.nu b/deploy.nu index db0e16b..b8fb962 100644 --- a/deploy.nu +++ b/deploy.nu @@ -27,9 +27,9 @@ def main [host: string, destination: string, ssh_key: path] { cargo zigbuild --target $target } - # invoke_ssh [sudo systemctl stop $app_name] + # invoke_ssh $"sudo systemctl stop ($app_name)" copy_ssh ./target/($target)/($build)/($app_name) $destination invoke_ssh $"chmod u+x ($destination)/($app_name)" - # invoke_ssh [sudo systemctl start $app_name] + # invoke_ssh $"sudo systemctl start ($app_name)" print "Deployment finished" } \ No newline at end of file diff --git a/doc/staking_watchdog.service b/doc/staking_watchdog.service index dfda77a..52a73b3 100644 --- a/doc/staking_watchdog.service +++ b/doc/staking_watchdog.service @@ -2,6 +2,7 @@ Description=staking_watchdog [Service] +User=gburri WorkingDirectory=/home/gburri/staking_watchdog ExecStart=/home/gburri/staking_watchdog/staking_watchdog SyslogIdentifier=staking_watchdog diff --git a/src/main.rs b/src/main.rs index 0b7c9c4..114b915 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,7 +35,13 @@ fn main() -> Result<()> { let config = Config::read(FILE_CONF)?; - println!("Configuration: {:?}", config); + println!( + "Configuration: {:?}", + Config { + smtp_password: "*****".to_string(), + ..config.clone() + } + ); let mut time_last_email_send = time::Instant::now() - EMAIL_RESEND_PERIOD;