From 5357149eb7ed0100ab687853ffe53c4f9245bd8a Mon Sep 17 00:00:00 2001 From: thespad Date: Wed, 3 Jul 2024 19:36:16 +0100 Subject: [PATCH] Conditional chown --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- readme-vars.yml | 4 +++- .../etc/s6-overlay/s6-rc.d/init-sabnzbd-config/run | 14 ++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7441fd..9a0a18f 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 5d96d94..10fc77c 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 7a49019..7dc58a4 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -6,7 +6,6 @@ project_url: "http://sabnzbd.org/" project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/sabnzbd-banner.png" project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction." project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" -project_blurb_optional_extras_enabled: false # supported architectures available_architectures: - {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"} @@ -30,6 +29,9 @@ opt_param_usage_include_vols: true 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 c72a055..97d3822 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 {} +