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 __LIGHTNING__
# This is not an array right now but that might change in the future
files=()
while IFS= read -r -d $'\0'; do
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
folder=$(find /var/www/mempool -name "config.js" | xargs dirname)
echo ${folder}
envsubst < ${folder}/config.template.js > ${folder}/config.js
exec "$@"