nixos/bacula: add system-bacula.slice (#338739)

This commit is contained in:
h7x4 2024-09-21 17:07:20 +02:00 committed by GitHub
commit f88d5e23d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -656,6 +656,11 @@ in {
};
config = mkIf (fd_cfg.enable || sd_cfg.enable || dir_cfg.enable) {
systemd.slices.system-bacula = {
description = "Bacula Slice";
documentation = [ "man:bacula(8)" "https://www.bacula.org/" ];
};
systemd.services.bacula-fd = mkIf fd_cfg.enable {
after = [ "network.target" ];
description = "Bacula File Daemon";
@ -666,6 +671,7 @@ in {
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
LogsDirectory = "bacula";
StateDirectory = "bacula";
Slice = "system-bacula.slice";
};
};
@ -679,6 +685,7 @@ in {
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
LogsDirectory = "bacula";
StateDirectory = "bacula";
Slice = "system-bacula.slice";
};
};
@ -694,6 +701,7 @@ in {
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
LogsDirectory = "bacula";
StateDirectory = "bacula";
Slice = "system-bacula.slice";
};
preStart = ''
if ! test -e "${libDir}/db-created"; then