feat: use /run/user to store socket and pid file

This commit is contained in:
Moritz Böhme 2023-07-29 18:11:32 +02:00
parent 0727b3e053
commit 67b3be4c4a
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
5 changed files with 20 additions and 4 deletions

View file

@ -1,4 +1,5 @@
use crate::daemon::{Answer, AnswerErr, Command as OtherCommand};
use crate::run_path;
use anyhow::{Context, Result};
use clap::{Parser, Subcommand};
use std::net::Shutdown;
@ -12,7 +13,7 @@ pub struct Cli {
#[command(subcommand)]
pub command: Command,
#[arg(short, long)]
#[clap(default_value = "/tmp/timers.socket")]
#[clap(default_value_t = format!("{}/timers.socket", run_path()))]
pub socket: String,
}