From 3e69697264a755dc141e5e5d2ef023950b460aa3 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Fri, 10 Jun 2022 16:34:16 +0100 Subject: [PATCH] Still chown old services folder if it exists --- root/etc/s6-overlay/s6-rc.d/init-custom-files/run | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/root/etc/s6-overlay/s6-rc.d/init-custom-files/run b/root/etc/s6-overlay/s6-rc.d/init-custom-files/run index a26cb2b..a193f63 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-custom-files/run +++ b/root/etc/s6-overlay/s6-rc.d/init-custom-files/run @@ -4,11 +4,18 @@ SCRIPTS_DIR_OLD="/config/custom-cont-init.d" SCRIPTS_DIR="/custom-cont-init.d" +SERVICES_DIR_OLD="/config/custom-services.d" + # chown legacy folders if they exist if [ -e "${SCRIPTS_DIR_OLD}" ]; then chown -R 0:0 "${SCRIPTS_DIR_OLD}" fi +# chown legacy folders if they exist +if [ -e "${SERVICES_DIR_OLD}" ]; then + chown -R 0:0 "${SERVICES_DIR_OLD}" +fi + if { [ -z "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]; } && \ { [ -z "$(/bin/ls -A ${SCRIPTS_DIR_OLD} 2>/dev/null)" ]; }; then echo "[custom-init] no custom files found, exiting..."