nixos/nextcloud: improve error message for invalid dbpassFile
`file_exists` also returns `FALSE` if the file is in a directory that can't be read by the user. This e.g. happens if permissions for `nixops(1)`-deployment keys aren't configured correctly. This patch improves the error message for invalid files to avoid confusion[1]. [1] https://discourse.nixos.org/t/nixops-deploy-secrets-to-nextcloud/10414/4
This commit is contained in:
parent
ace2457eaf
commit
81662d4798
@ -391,7 +391,9 @@ in {
|
|||||||
$file = "${c.dbpassFile}";
|
$file = "${c.dbpassFile}";
|
||||||
if (!file_exists($file)) {
|
if (!file_exists($file)) {
|
||||||
throw new \RuntimeException(sprintf(
|
throw new \RuntimeException(sprintf(
|
||||||
"Cannot start Nextcloud, dbpass file %s set by NixOS doesn't exist!",
|
"Cannot start Nextcloud, dbpass file %s set by NixOS doesn't seem to "
|
||||||
|
. "exist! Please make sure that the file exists and has appropriate "
|
||||||
|
. "permissions for user & group 'nextcloud'!",
|
||||||
$file
|
$file
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user