From 88d72fe1d0bf62421c63b13f0d392e5f1c9739a1 Mon Sep 17 00:00:00 2001 From: thespad Date: Wed, 3 Jul 2024 19:34:52 +0100 Subject: [PATCH] Conditional chowns --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- readme-vars.yml | 2 ++ .../etc/s6-overlay/s6-rc.d/init-sabnzbd-config/run | 14 ++++++-------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 035c59d7..5795dc54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/unrar:latest as unrar +FROM ghcr.io/linuxserver/unrar:latest AS unrar FROM ghcr.io/linuxserver/baseimage-alpine:3.20 diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 93733db4..76516857 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/unrar:arm64v8-latest as unrar +FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20 diff --git a/readme-vars.yml b/readme-vars.yml index cdaee4af..2eb770f9 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -36,6 +36,8 @@ opt_param_volumes: - { vol_path: "/downloads", vol_host_path: "/path/to/downloads", desc: "Local path for finished downloads." } - { vol_path: "/incomplete-downloads", vol_host_path: "/path/to/incomplete/downloads", desc: "Local path for incomplete-downloads." } +readonly_supported: true + # application setup block app_setup_block_enabled: true app_setup_block: | diff --git a/root/etc/s6-overlay/s6-rc.d/init-sabnzbd-config/run b/root/etc/s6-overlay/s6-rc.d/init-sabnzbd-config/run index c72a0559..97d38229 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-sabnzbd-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-sabnzbd-config/run @@ -1,14 +1,12 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash -# make folders -mkdir -p \ - /downloads \ - /incomplete-downloads +if grep -qe ' /downloads ' /proc/mounts; then + lsiown abc:abc /downloads +fi -# permissions -lsiown abc:abc \ - /downloads \ - /incomplete-downloads +if grep -qe ' /incomplete-downloads ' /proc/mounts; then + lsiown abc:abc /incomplete-downloads +fi find /config -path /config/Downloads -prune -o -exec lsiown abc:abc {} +