Add UMASK

This commit is contained in:
MarkusMcNugen 2018-10-06 23:31:19 -04:00 committed by GitHub
parent 3d8a0858be
commit 1e581a1487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -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