git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/zabbixWeb: remove added whitespace to the passwordFile option
commit5d7683fcae9f3958bf5e200aeb5b0d0fb6c452dd authorAaron Andersen <aaron@fosslib.net> dateTue 2 Nov 2021, 10:35 (5 years ago) parentea15d93
1 file changed+2−1
nixos/modules/services/web-apps/zabbix.nix+2−1
nixos/modules/services/web-apps/zabbix.nix+2−1
@@ -21,7 +21,8 @@ let
2121 $DB['PORT'] = '${toString cfg.database.port}';
2222 $DB['DATABASE'] = '${cfg.database.name}';
2323 $DB['USER'] = '${cfg.database.user}';
24− $DB['PASSWORD'] = ${if cfg.database.passwordFile != null then "file_get_contents('${cfg.database.passwordFile}')" else "''"};
24+ # NOTE: file_get_contents adds newline at the end of returned string
25+ $DB['PASSWORD'] = ${if cfg.database.passwordFile != null then "trim(file_get_contents('${cfg.database.passwordFile}'), \"\\r\\n\")" else "''"};
2526 // Schema name. Used for IBM DB2 and PostgreSQL.
2627 $DB['SCHEMA'] = ''';
2728 $ZBX_SERVER = '${cfg.server.address}';