diff --git a/pkgs/servers/monitoring/icinga2/default.nix b/pkgs/servers/monitoring/icinga2/default.nix index b85cccf18386..f1ba40574837 100644 --- a/pkgs/servers/monitoring/icinga2/default.nix +++ b/pkgs/servers/monitoring/icinga2/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { # Get rid of sbin sed -i 's/sbin/bin/g' $out/lib/icinga2/safe-reload - sed -i 's/sbin/bin/g' $out/bin/icinga2 + sed -i "2s:.*:ICINGA2_BIN=$out/bin/icinga2:" $out/bin/icinga2 rm $out/sbin ${lib.optionalString withMysql ''