diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2016-09-29 13:51:44 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2016-09-29 13:51:44 +0300 |
commit | 62f28d30a069135f9c48678507203958adfc334f (patch) | |
tree | 7f38af0c8d3f445ee8cc50906a639baec7011127 /pkgs/check_systemd | |
parent | 1af9e6589bdd18e6ba7eeabf073aa7d710020cdd (diff) | |
download | nixsap-62f28d30a069135f9c48678507203958adfc334f.tar.gz |
Moved everything into ./modules
Diffstat (limited to 'pkgs/check_systemd')
-rwxr-xr-x | pkgs/check_systemd/check_systemd | 20 | ||||
-rw-r--r-- | pkgs/check_systemd/default.nix | 25 |
2 files changed, 0 insertions, 45 deletions
diff --git a/pkgs/check_systemd/check_systemd b/pkgs/check_systemd/check_systemd deleted file mode 100755 index e668331..0000000 --- a/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/pkgs/check_systemd/default.nix b/pkgs/check_systemd/default.nix deleted file mode 100644 index da92a64..0000000 --- a/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 - ''; -} |