quick fix
This commit is contained in:
@@ -226,14 +226,14 @@ fn get_settings() -> Settings {
|
|||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn 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 stdout = File::create("/var/vote/log/daemon.out").unwrap();
|
||||||
let stderr = File::create("/var/vote/log/daemon.err").unwrap();
|
let stderr = File::create("/var/vote/log/daemon.err").unwrap();
|
||||||
|
|
||||||
let daemonize = Daemonize::new()
|
let daemonize = Daemonize::new()
|
||||||
.pid_file("/var/vote/server.pid")
|
.pid_file("/var/vote/server.pid")
|
||||||
.chown_pid_file(true)
|
.chown_pid_file(true)
|
||||||
.working_directory(current_directory.to_str())
|
.working_directory(current_directory.to_str().unwrap())
|
||||||
.stdout(stdout)
|
.stdout(stdout)
|
||||||
.stderr(stderr);
|
.stderr(stderr);
|
||||||
match daemonize.start() {
|
match daemonize.start() {
|
||||||
|
|||||||
Reference in New Issue
Block a user