Use a single command to find the config path

This commit is contained in:
Felipe Knorr Kuhn 2022-10-16 08:40:22 -07:00
parent 670f85b1f5
commit 5bfc8a9d58
No known key found for this signature in database
GPG Key ID: 79619B52BB097C1A

View File

@ -53,17 +53,8 @@ export __BISQ_WEBSITE_URL__
export __MINING_DASHBOARD__ export __MINING_DASHBOARD__
export __LIGHTNING__ export __LIGHTNING__
# This is not an array right now but that might change in the future folder=$(find /var/www/mempool -name "config.js" | xargs dirname)
files=() echo ${folder}
while IFS= read -r -d $'\0'; do envsubst < ${folder}/config.template.js > ${folder}/config.js
files+=("$REPLY")
done < <(find /var/www/mempool -name "config.js" -print0)
for file in "${files[@]}"
do
folder=$(dirname ${file})
echo ${folder}
envsubst < ${folder}/config.template.js > ${folder}/config.js
done
exec "$@" exec "$@"