Add daemon CLI commands

- Introduce option `--background` for `daemon start` to send the new
  process into the background.
- Implement a `ProcessDescr` which identifies a Husk process. This pays
  attention to the possibility of a rollover of the process ids.
- Implement `daemon status`.
- Implement `daemon stop` which sends `SIG_INT` to a running Husk
  process.
This commit is contained in:
Malte Meiboom
2026-06-30 12:17:07 +02:00
parent 847bdb1294
commit ee6b467139
11 changed files with 395 additions and 28 deletions
+2
View File
@@ -6,6 +6,8 @@ pub const CONFIG_FILE_LOCATION: &str = "/etc/husk/config.toml";
/// and replaced by `SUBJECT_REPLACEMENT` (unless configured otherwise).
pub const SUBJECT_REPLACEMENT: &str = "...";
pub const PID_FILE_LOCATION: &str = "/run/husk/pid";
/// Default logging configuration.
pub const CONSOLE_LOGGING: &str = "
[appenders.console]