From 1e581a14870cac57b5b2f4046488166cf7951963 Mon Sep 17 00:00:00 2001 From: MarkusMcNugen Date: Sat, 6 Oct 2018 23:31:19 -0400 Subject: [PATCH] Add UMASK --- qbittorrent/start.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qbittorrent/start.sh b/qbittorrent/start.sh index 59ce6ae..743ff73 100644 --- a/qbittorrent/start.sh +++ b/qbittorrent/start.sh @@ -29,6 +29,16 @@ else useradd -c "qbittorent user" -g $PGID -u $PUID qbittorent fi +# set umask +export UMASK=$(echo "${UMASK}" | sed -e 's~^[ \t]*~~;s~[ \t]*$~~') + +if [[ ! -z "${UMASK}" ]]; then + echo "[info] UMASK defined as '${UMASK}'" | ts '%Y-%m-%d %H:%M:%.S' +else + echo "[warn] UMASK not defined (via -e UMASK), defaulting to '022'" | ts '%Y-%m-%d %H:%M:%.S' + export UMASK="022" +fi + # Set qBittorrent WebUI and Incoming ports if [ ! -z "${WEBUI_PORT}" ]; then