Standardise logic so it works cross-distro
This commit is contained in:
parent
7b8515c27e
commit
ea7f9dddff
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
if [[ "$(find /var/run/s6/container_environment/ -maxdepth 1 -print0 | xargs)" == *"FILE__"* ]]; then
|
if [[ "$(find /var/run/s6/container_environment/*"FILE__"* -maxdepth 1 2>/dev/null)" ]]; then
|
||||||
for FILENAME in /var/run/s6/container_environment/*; do
|
for FILENAME in /var/run/s6/container_environment/*; do
|
||||||
if [[ "${FILENAME##*/}" == "FILE__"* ]]; then
|
if [[ "${FILENAME##*/}" == "FILE__"* ]]; then
|
||||||
SECRETFILE=$(cat "${FILENAME}")
|
SECRETFILE=$(cat "${FILENAME}")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue