depot/packages/dream2nix-overrides/nodejs/uptime-kuma/chmod-database.patch

13 lines
460 B
Diff
Raw Permalink Normal View History

diff --git a/server/server.js b/server/server.js
index 73ea3f5..31b8028 100644
--- a/server/server.js
+++ b/server/server.js
@@ -1541,6 +1541,7 @@ async function initDatabase(testMode = false) {
if (! fs.existsSync(Database.path)) {
log.info("server", "Copying Database");
fs.copyFileSync(Database.templatePath, Database.path);
+ fs.chmodSync(Database.path, 0o600);
}
log.info("server", "Connecting to the Database");