nixos/roundcube: Ignore newline at end of password file

This commit is contained in:
Steffen Beyer 2023-11-11 00:17:53 +01:00 committed by GitHub
parent 8575645827
commit ae5fe741ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ in
${lib.optionalString (!localDB) ''
$password = file('${cfg.database.passwordFile}')[0];
$password = preg_split('~\\\\.(*SKIP)(*FAIL)|\:~s', $password);
$password = end($password);
$password = rtrim(end($password));
$password = str_replace("\\:", ":", $password);
$password = str_replace("\\\\", "\\", $password);
''}