From f1e56d31faf7216100ef170197ddc6fd45d79adb Mon Sep 17 00:00:00 2001 From: SirFerdek <17548441+SirFerdek@users.noreply.github.com> Date: Thu, 13 Jun 2019 00:03:56 +0200 Subject: [PATCH] Fix umask - get umask from environment Makes it consistent with other linuxserver.io images. --- README.md | 4 ++++ readme-vars.yml | 5 +++++ root/etc/services.d/sonarr/run | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c25cc02..19bc5b5 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ docker create \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Europe/London \ + -e UMASK_SET=022 `#optional` \ -p 8989:8989 \ -v :/config \ -v :/tv \ @@ -88,6 +89,7 @@ services: - PUID=1000 - PGID=1000 - TZ=Europe/London + - UMASK_SET=022 #optional volumes: - :/config - :/tv @@ -107,6 +109,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, this is required for Sonarr | +| `-e UMASK_SET=022` | control permissions of files and directories created by Sonarr | | `-v /config` | Database and sonarr configs | | `-v /tv` | Location of TV library on disk | | `-v /downloads` | Location of download managers output directory | @@ -193,6 +196,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **13.06.19:** - Add env variable for setting umask. * **10.05.19:** - Rebase to Bionic. * **23.03.19:** - Switching to new Base images, shift to arm32v7 tag. * **01.02.19:** - Multi arch images and pipeline build logic diff --git a/readme-vars.yml b/readme-vars.yml index 8f33c44..e530c47 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -36,6 +36,10 @@ param_ports: param_usage_include_env: true param_env_vars: - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London, this is required for Sonarr"} +# optional env variables +opt_param_usage_include_env: true +opt_param_env_vars: + - { env_var: "UMASK_SET", env_value: "022", desc: "control permissions of files and directories created by Sonarr"} # application setup block app_setup_block_enabled: true @@ -44,6 +48,7 @@ app_setup_block: | # changelog changelogs: + - { date: "13.06.19:", desc: "Add env variable for setting umask." } - { date: "10.05.19:", desc: "Rebase to Bionic." } - { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." } - { date: "01.02.19:", desc: "Multi arch images and pipeline build logic" } diff --git a/root/etc/services.d/sonarr/run b/root/etc/services.d/sonarr/run index 1d2c786..442ae89 100644 --- a/root/etc/services.d/sonarr/run +++ b/root/etc/services.d/sonarr/run @@ -1,6 +1,8 @@ #!/usr/bin/with-contenv bash -umask 022 +UMASK_SET=${UMASK_SET:-022} + +umask "$UMASK_SET" cd /opt/NzbDrone || exit