aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs/check_systemd
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2018-12-11 18:10:48 +0300
committerIgor Pashev <pashev.igor@gmail.com>2018-12-11 18:10:48 +0300
commit8b0968b2054d3bb8d90b5ac056727f7c2ebeaed3 (patch)
treed03b70f693463fc836a8dbe4240424d2547530c8 /modules/pkgs/check_systemd
parentc4273035cf5876e3ba8ed2c6b492d31c2de290ee (diff)
downloadnixsap-8b0968b2054d3bb8d90b5ac056727f7c2ebeaed3.tar.gz
(* HUGE *) Use nixpkgs overlays
Diffstat (limited to 'modules/pkgs/check_systemd')
-rwxr-xr-xmodules/pkgs/check_systemd/check_systemd20
-rw-r--r--modules/pkgs/check_systemd/default.nix25
2 files changed, 0 insertions, 45 deletions
diff --git a/modules/pkgs/check_systemd/check_systemd b/modules/pkgs/check_systemd/check_systemd
deleted file mode 100755
index e668331..0000000
--- a/modules/pkgs/check_systemd/check_systemd
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-
-set -euo pipefail
-
-readarray -t failed < <( systemctl show '*.service' \
- --state=failed --property=Names \
- | sed -r -n 's,Names=(.+)\.service,\1,p' \
- | sort
- )
-
-if [ ${#failed[@]} -ne 0 ]; then
- printf -v list ', %s' "${failed[@]}"
- printf 'WARNING: %s failed\n' "${list:2}"
- exit 1
-else
- echo "OK: no failed services"
- exit 0
-fi
-
-
diff --git a/modules/pkgs/check_systemd/default.nix b/modules/pkgs/check_systemd/default.nix
deleted file mode 100644
index da92a64..0000000
--- a/modules/pkgs/check_systemd/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ stdenv, gnused }:
-
-stdenv.mkDerivation {
- name = "check_systemd";
- src = ./check_systemd;
- outputs = [ "out" "conf" ];
- unpackPhase = ":";
- installPhase = ''
- mkdir -p $out/bin
-
- cp "$src" $out/bin/check_systemd
-
- substituteInPlace "$out/bin/"* \
- --replace sed '${gnused}/bin/sed'
-
- chmod +x "$out/bin/"*
-
- cat <<CONF > $conf
- object CheckCommand "systemd" {
- import "plugin-check-command"
- command = [ "$out/bin/check_systemd" ]
- }
- CONF
- '';
-}