git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #144250 from aanderse/nixos/zabbixWeb
commitd3f2137f5c771c3ed164e032aef6c6e5b0de7aa6 authorSandro <sandro.jaeckel@gmail.com> dateThu 11 Nov 2021, 15:21 (5 years ago) parentfe296215d7683f
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}';