From 82bd708fd2f9be32732ea2584fbca3ffab9997f8 Mon Sep 17 00:00:00 2001 From: thelamer Date: Tue, 13 Aug 2019 09:40:46 -0700 Subject: [PATCH] add umask setting as optional variable --- README.md | 3 +++ readme-vars.yml | 3 +++ root/etc/services.d/jellyfin/run | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/README.md b/README.md index ec870a8..7cdfeef 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ docker create \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Europe/London \ + -e UMASK_SET=<022> `#optional` \ -p 8096:8096 \ -p 8920:8920 `#optional` \ -v :/config \ @@ -80,6 +81,7 @@ services: - PUID=1000 - PGID=1000 - TZ=Europe/London + - UMASK_SET=<022> #optional volumes: - :/config - :/data/tvshows @@ -104,6 +106,7 @@ Container images are configured using parameters passed at runtime (such as thos | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | | `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London | +| `-e UMASK_SET=<022>` | for umask setting of Emby, default if left unset is 022. | | `-v /config` | Jellyfin data storage location. *This can grow very large, 50gb+ is likely for a large collection.* | | `-v /data/tvshows` | Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc. | | `-v /data/movies` | Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc. | diff --git a/readme-vars.yml b/readme-vars.yml index 8022626..79c2f0d 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -28,6 +28,9 @@ param_usage_include_env: true param_env_vars: - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"} # optional container parameters +opt_param_usage_include_env: true +opt_param_env_vars: + - { env_var: "UMASK_SET", env_value: "<022>", desc: "for umask setting of Emby, default if left unset is 022."} opt_param_usage_include_vols: true opt_param_volumes: - { vol_path: "/transcode", vol_host_path: "", desc: "Path for transcoding folder, *optional*." } diff --git a/root/etc/services.d/jellyfin/run b/root/etc/services.d/jellyfin/run index b4ea1ab..e369b04 100644 --- a/root/etc/services.d/jellyfin/run +++ b/root/etc/services.d/jellyfin/run @@ -5,6 +5,10 @@ JELLYFIN_CONFIG_DIR="/config" \ JELLYFIN_LOG_DIR="/config/log" \ JELLYFIN_CACHE_DIR="/config/cache" +# set umask +UMASK_SET=${UMASK_SET:-022} +umask "$UMASK_SET" + exec \ s6-setuidgid abc /usr/bin/jellyfin \ --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg