feat: use /run/user to store socket and pid file
This commit is contained in:
parent
0727b3e053
commit
67b3be4c4a
5 changed files with 20 additions and 4 deletions
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue