From 26ad1955976b6aab73909e9c81d66e1e9f2be2bf Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Sun, 3 May 2020 13:40:54 -0400 Subject: [PATCH] Adds ability to set umask through an environment variable. Does not work on Windows, and it's untested on Linux --- backend/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/app.js b/backend/app.js index ed0b8f3..ed05ff1 100644 --- a/backend/app.js +++ b/backend/app.js @@ -40,6 +40,11 @@ const db = low(adapter) const users_adapter = new FileSync('./appdata/users.json'); const users_db = low(users_adapter); +// env var setup + +const umask = process.env.YTDL_UMASK; +if (umask) process.umask(parseInt(umask)); + // check if debug mode let debugMode = process.env.YTDL_MODE === 'debug';