From 7dc2c481c6617f8f09167f8ea4bd412206e9ad86 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 18 Apr 2018 12:18:35 +0200 Subject: massage systemd units --- custom/borgbackup.nix | 2 +- custom/unit-status-mail.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'custom') diff --git a/custom/borgbackup.nix b/custom/borgbackup.nix index a10f6590..dc40c652 100644 --- a/custom/borgbackup.nix +++ b/custom/borgbackup.nix @@ -141,7 +141,7 @@ in { ${tCfg.repo}::${cfg.prefix}$1-{utcnow} ''; in if tCfg.lock == null then borgCmd else "flock -xo /var/lock/${tCfg.lock} ${borgCmd}"; - scriptArgs = "%I"; + scriptArgs = if cfg.snapshots == "lvm" then "%I" else "%i"; unitConfig = { AssertPathIsDirectory = mkIf (tCfg.lock != null) "/var/lock"; diff --git a/custom/unit-status-mail.nix b/custom/unit-status-mail.nix index 39706c2e..eae03594 100644 --- a/custom/unit-status-mail.nix +++ b/custom/unit-status-mail.nix @@ -34,7 +34,7 @@ in { serviceConfig = { Type = "oneshot"; }; - scriptArgs = "\"%I\" \"Hostname: %H\" \"Machine-ID: %m\" \"Boot-ID: %b\""; + scriptArgs = "\"%i\" \"Hostname: %H\" \"Machine-ID: %m\" \"Boot-ID: %b\""; path = with pkgs; [nettools]; script = '' #!${pkgs.stdenv.shell} @@ -54,7 +54,7 @@ in { Status report for unit: $UNIT $EXTRA - $(systemctl status $UNIT) + $(systemctl status --lines=1000 --full $UNIT) EOF ''; }; -- cgit v1.2.3