From 1ddb0190815cd74b010c8f751911aa762c77bac3 Mon Sep 17 00:00:00 2001 From: AINDUSTRIES Date: Fri, 20 Sep 2024 19:28:01 +0200 Subject: [PATCH] quick fix --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index fb12c67..fca152b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -226,14 +226,14 @@ fn get_settings() -> Settings { #[cfg(target_os = "linux")] #[tokio::main] async fn main() { - let current_directory = env::current_dir().expect("Could not get app directory.").expect("Could not get app directory. (Required to run at all)"); + let current_directory = env::current_dir().expect("Could not get app directory."); let stdout = File::create("/var/vote/log/daemon.out").unwrap(); let stderr = File::create("/var/vote/log/daemon.err").unwrap(); let daemonize = Daemonize::new() .pid_file("/var/vote/server.pid") .chown_pid_file(true) - .working_directory(current_directory.to_str()) + .working_directory(current_directory.to_str().unwrap()) .stdout(stdout) .stderr(stderr); match daemonize.start() {