diff --git a/.version b/.version index cfd472b13..93d20b2df 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.9.21 +2.9.22 diff --git a/README.md b/README.md index 80393647a..0d80be33a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
-
+
diff --git a/docker/rootfs/etc/cont-finish.d/.gitignore b/docker/rootfs/etc/cont-finish.d/.gitignore
deleted file mode 100644
index d6b7ef32c..000000000
--- a/docker/rootfs/etc/cont-finish.d/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/docker/rootfs/etc/cont-init.d/.gitignore b/docker/rootfs/etc/cont-init.d/.gitignore
deleted file mode 100644
index f04f0f6e0..000000000
--- a/docker/rootfs/etc/cont-init.d/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*
-!.gitignore
-!*.sh
diff --git a/docker/rootfs/etc/cont-init.d/01_perms.sh b/docker/rootfs/etc/cont-init.d/01_perms.sh
deleted file mode 100755
index e7875d329..000000000
--- a/docker/rootfs/etc/cont-init.d/01_perms.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/with-contenv bash
-set -e
-
-mkdir -p /data/logs
-echo "Changing ownership of /data/logs to $(id -u):$(id -g)"
-chown -R "$(id -u):$(id -g)" /data/logs
-
diff --git a/docker/rootfs/etc/cont-init.d/01_s6-secret-init.sh b/docker/rootfs/etc/cont-init.d/01_s6-secret-init.sh
deleted file mode 100644
index 7a2e2d02d..000000000
--- a/docker/rootfs/etc/cont-init.d/01_s6-secret-init.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/with-contenv bash
-# ref: https://github.com/linuxserver/docker-baseimage-alpine/blob/master/root/etc/cont-init.d/01-envfile
-
-# in s6, environmental variables are written as text files for s6 to monitor
-# search through full-path filenames for files ending in "__FILE"
-for FILENAME in $(find /var/run/s6/container_environment/ | grep "__FILE$"); do
- echo "[secret-init] Evaluating ${FILENAME##*/} ..."
-
- # set SECRETFILE to the contents of the full-path textfile
- SECRETFILE=$(cat ${FILENAME})
- # SECRETFILE=${FILENAME}
- # echo "[secret-init] Set SECRETFILE to ${SECRETFILE}" # DEBUG - rm for prod!
-
- # if SECRETFILE exists / is not null
- if [[ -f ${SECRETFILE} ]]; then
- # strip the appended "__FILE" from environmental variable name ...
- STRIPFILE=$(echo ${FILENAME} | sed "s/__FILE//g")
- # echo "[secret-init] Set STRIPFILE to ${STRIPFILE}" # DEBUG - rm for prod!
-
- # ... and set value to contents of secretfile
- # since s6 uses text files, this is effectively "export ..."
- printf $(cat ${SECRETFILE}) > ${STRIPFILE}
- # echo "[secret-init] Set ${STRIPFILE##*/} to $(cat ${STRIPFILE})" # DEBUG - rm for prod!"
- echo "[secret-init] Success! ${STRIPFILE##*/} set from ${FILENAME##*/}"
-
- else
- echo "[secret-init] cannot find secret in ${FILENAME}"
- fi
-done
diff --git a/docker/rootfs/etc/fix-attrs.d/.gitignore b/docker/rootfs/etc/fix-attrs.d/.gitignore
deleted file mode 100644
index d6b7ef32c..000000000
--- a/docker/rootfs/etc/fix-attrs.d/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/script.sh b/docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/script.sh
index 4b506ca92..5723ea7a3 100755
--- a/docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/script.sh
+++ b/docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/script.sh
@@ -48,10 +48,40 @@ else
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" { sub(/%.*$/,"",$2); print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf) valid=10s;" > /etc/nginx/conf.d/include/resolvers.conf
fi
+echo "Changing ownership of /data/logs to $(id -u):$(id -g)"
+chown -R "$(id -u):$(id -g)" /data/logs
+
# Handle IPV6 settings
/bin/handle-ipv6-setting /etc/nginx/conf.d
/bin/handle-ipv6-setting /data/nginx
+# ref: https://github.com/linuxserver/docker-baseimage-alpine/blob/master/root/etc/cont-init.d/01-envfile
+
+# in s6, environmental variables are written as text files for s6 to monitor
+# search through full-path filenames for files ending in "__FILE"
+echo "❯ Secrets-init ..."
+for FILENAME in $(find /var/run/s6/container_environment/ | grep "__FILE$"); do
+ echo "[secret-init] Evaluating ${FILENAME##*/} ..."
+
+ # set SECRETFILE to the contents of the full-path textfile
+ SECRETFILE=$(cat "${FILENAME}")
+ # if SECRETFILE exists / is not null
+ if [[ -f "${SECRETFILE}" ]]; then
+ # strip the appended "__FILE" from environmental variable name ...
+ STRIPFILE=$(echo "${FILENAME}" | sed "s/__FILE//g")
+ # echo "[secret-init] Set STRIPFILE to ${STRIPFILE}" # DEBUG - rm for prod!
+
+ # ... and set value to contents of secretfile
+ # since s6 uses text files, this is effectively "export ..."
+ printf $(cat "${SECRETFILE}") > "${STRIPFILE}"
+ # echo "[secret-init] Set ${STRIPFILE##*/} to $(cat ${STRIPFILE})" # DEBUG - rm for prod!"
+ echo "[secret-init] Success! ${STRIPFILE##*/} set from ${FILENAME##*/}"
+
+ else
+ echo "[secret-init] cannot find secret in ${FILENAME}"
+ fi
+done
+
echo
echo "-------------------------------------
_ _ ____ __ __