summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorsymphorien+git@xlumurb.eu <Symphorien Gibol>2019-12-26 12:00:00 +0000
committerAustin Seipp <aseipp@pobox.com>2019-12-29 15:45:13 -0600
commit18090331d6e0307c6ee65a6f9999140cec230f61 (patch)
treea179d39cbaec2fdb1e646661c81c630f26dbb5fa /pkgs/servers
parentbe90b35b9efbd7baaa80f367ffc41609531a8fe2 (diff)
downloadnixpkgs-18090331d6e0307c6ee65a6f9999140cec230f61.tar
nixpkgs-18090331d6e0307c6ee65a6f9999140cec230f61.tar.gz
nixpkgs-18090331d6e0307c6ee65a6f9999140cec230f61.tar.bz2
nixpkgs-18090331d6e0307c6ee65a6f9999140cec230f61.tar.lz
nixpkgs-18090331d6e0307c6ee65a6f9999140cec230f61.tar.xz
nixpkgs-18090331d6e0307c6ee65a6f9999140cec230f61.tar.zst
nixpkgs-18090331d6e0307c6ee65a6f9999140cec230f61.zip
monitoring plugins: fix path to sudo and mailq
this fixes check_mailq with postfix at least
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/monitoring/plugins/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/servers/monitoring/plugins/default.nix b/pkgs/servers/monitoring/plugins/default.nix
index 887256c85af..f72fa16cd12 100644
--- a/pkgs/servers/monitoring/plugins/default.nix
+++ b/pkgs/servers/monitoring/plugins/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook
+{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, runCommand
 , coreutils, gnugrep, gnused, lm_sensors, net-snmp, openssh, openssl, perl
 , dnsutils, libdbi, libmysqlclient, zlib, openldap, procps
 , runtimeShell }:
@@ -44,6 +44,11 @@ in stdenv.mkDerivation {
     configureFlagsArray=(
       --with-ping-command='/run/wrappers/bin/ping -4 -n -U -w %d -c %d %s'
       --with-ping6-command='/run/wrappers/bin/ping -6 -n -U -w %d -c %d %s'
+      --with-sudo-command='/run/wrappers/bin/sudo'
+      --with-mailq-command='${runCommand "mailq-wrapper" {preferLocalBuild=true;} ''
+        mkdir -p $out/bin
+        ln -s /run/wrappers/bin/sendmail $out/bin/mailq
+        ''}/bin/mailq'
     )
   '';