Remove redundant if
This commit is contained in:
parent
6bb5231d17
commit
7c6601c83a
|
|
@ -1,9 +1,8 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
if find /run/s6/container_environment/*"FILE__"* -maxdepth 1 > /dev/null 2>&1; then
|
if find /run/s6/container_environment/FILE__* -maxdepth 1 > /dev/null 2>&1; then
|
||||||
for FILENAME in /run/s6/container_environment/*; do
|
for FILENAME in /run/s6/container_environment/*; do
|
||||||
if [[ "${FILENAME##*/}" == "FILE__"* ]]; then
|
|
||||||
SECRETFILE=$(cat "${FILENAME}")
|
SECRETFILE=$(cat "${FILENAME}")
|
||||||
if [[ -f ${SECRETFILE} ]]; then
|
if [[ -f ${SECRETFILE} ]]; then
|
||||||
FILESTRIP=${FILENAME//FILE__/}
|
FILESTRIP=${FILENAME//FILE__/}
|
||||||
|
|
@ -16,6 +15,5 @@ if find /run/s6/container_environment/*"FILE__"* -maxdepth 1 > /dev/null 2>&1; t
|
||||||
else
|
else
|
||||||
echo "[env-init] cannot find secret in ${FILENAME##*/}"
|
echo "[env-init] cannot find secret in ${FILENAME##*/}"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue